code: def get_output_metadata(self, path, filename):
          
  
          checksums = get_checksums(path, ['md5'])
          metadata = {'filename': filename,
                      'filesize': os.path.getsize(path),
                      'checksum': checksums['md5sum'],
                      'checksum_type': 'md5'}
  
          if self.metadata_only:
              metadata['metadata_only'] = True
  
          return metadata
docs: Describe a file by its metadata.
  
          :return: dict