parameters: (bazel_dep: str)
docstring: Returns name of dependency if external bazel dependency is provided or None
docstring_summary: Returns name of dependency if external bazel dependency is provided or None
docstring_tokens: Returns name of dependency if external bazel dependency is provided or None
function: def _external_dep_name_from_bazel_dependency(bazel_dep: str) -> Optional[str]:
      """Returns name of dependency if external bazel dependency is provided or None"""
      if bazel_dep.startswith('@com_google_absl//'):
          # special case for add dependency on one of the absl libraries (there is not just one absl library)
          prefixlen = len('@com_google_absl//')
          return bazel_dep[prefixlen:]
      elif bazel_dep == '//external:upb_lib':
          return 'upb'
      elif bazel_dep == '//external:benchmark':
          return 'benchmark'
      elif bazel_dep == '//external:libssl':
          return 'libssl'
      else:
          # all the other external deps such as protobuf, cares, zlib
          # don't need to be listed explicitly, they are handled automatically
          # by the build system (make, cmake)
          return None
function_tokens: def _external_dep_name_from_bazel_dependency ( bazel_dep : str ) -> Optional [ str ] : if bazel_dep . startswith ( '@com_google_absl//' ) : # special case for add dependency on one of the absl libraries (there is not just one absl library) prefixlen = len ( '@com_google_absl//' ) return bazel_dep [ prefixlen : ] elif bazel_dep == '//external:upb_lib' : return 'upb' elif bazel_dep == '//external:benchmark' : return 'benchmark' elif bazel_dep == '//external:libssl' : return 'libssl' else : # all the other external deps such as protobuf, cares, zlib # don't need to be listed explicitly, they are handled automatically # by the build system (make, cmake) return None