code: def from_package(cls, parse_context, pkg='', rev='', **kwargs):
      
      if 'name' in kwargs:
        raise TargetDefinitionException(Address(parse_context.rel_path, kwargs['name']),
                                        'A go_remote_library does not accept a name; instead, '
                                        'the name is taken from the `pkg` or the BUILD file location '
                                        'if no package is specified.')
      name = pkg or os.path.basename(parse_context.rel_path)
  
      # We trap for dependencies in the macro since dependencies are special and are popped from
      # **kwargs by the time the constructor below is called by the BUILD file parsing infra.
      if 'dependencies' in kwargs:
        raise TargetDefinitionException(Address(parse_context.rel_path, name),
                                        'A go_remote_library does not accept dependencies; instead, '
                                        'they are discovered and when they are on foreign remote '
                                        'libraries the versions are taken from other '
                                        'go_remote_library targets you\'ve defined in the same '
                                        'source root.')
      parse_context.create_object(cls, type_alias='go_remote_library', name=name, pkg=pkg, rev=rev,
                                  **kwargs)
docs: :param string pkg: The package import paths within the remote library; by default just the
                         root package will be available (equivalent to passing `pkg=''`).
      :param string rev: Identifies which version of the remote library to download. This could be a
                         commit SHA (git), node id (hg), etc.  If left unspecified the version will
                         default to the latest available.  It's highly recommended to not accept the
                         default and instead pin the rev explicitly for repeatable builds.