code: def get_and_update_package_metadata():
      
      global setup_arguments
      global METADATA_FILENAME
  
      if not os.path.exists('.git') and os.path.exists(METADATA_FILENAME):
          with open(METADATA_FILENAME) as fh:
              metadata = json.load(fh)
      else:
          git = Git(version=setup_arguments['version'])
          metadata = {
              'version': git.version,
              'long_description': 'Tool to pip install missing imports and more',
              'git_hash': git.hash,
              'git_origin': git.origin,
              'git_branch': git.branch
          }
          for readme_file in ['README.rst', 'README.md', 'README.txt']:
              if os.path.exists(readme_file):
                  with open(readme_file) as file_handle:
                      metadata['long_description'] = file_handle.read()
                  break
          with open(METADATA_FILENAME, 'w') as fh:
              json.dump(metadata, fh)
      return metadata
docs: Update the package metadata for this package if we are building the package.
      :return:metadata - Dictionary of metadata information