def METHOD_NAME(self, row):
    if self.metadata_fields is None:
        local_metadata = dict(row)
        for key in list(local_metadata):
            if key == self.time_field or key in self.state_vector_fields:
                del local_metadata[key]
    else:
        local_metadata = {field: row[field]
                          for field in self.metadata_fields
                          if field in row}
    return local_metadata