code: def _get_metadata(cls, request, response, head=None):
          
          head = response.get('head_id', head)
          metadata = {'link': cls._build_url(request, head=head)}
  
          if head is not None:
              metadata['head'] = head
          return metadata
docs: Parses out the head and link properties based on the HTTP Request
          from the client, and the Protobuf response from the validator.