def METHOD_NAME(self, metadata: metadata_type) -> metadata_type:
    """
    Ensures that the metadata is in the order of the field keys and has the right size.
    if the metadata doesn't contains a key which is stored in the DB it will add it as
    an empty string. Key, value pairs that are not stored in the DB are dropped.
    :param metadata: The container metadata
    """
    return {k: metadata.get(k, "") for k in self._queries.fields.keys()}