def METHOD_NAME(self, metadata):
    """Provide missing metadata information to task if not already set.
    This method is especially useful in orchestration where metadata may
    not be
    available when specifying the task.
    Parameters
    ----------
    metadata : pandas.DataFrame
        Metadata container
    Returns
    -------
    self : an instance of self
    """
    # TODO replace whole pandas data container as input argument with
    #  separated metadata container
    # only set metadata if metadata is not already set, otherwise raise
    # error
    if self._metadata is not None:
        raise AttributeError(
            "Metadata is already set and can only be set once, create a "
            "new task for different metadata"
        )
    # check for consistency of information provided in task with given
    # metadata
    self.check_data_compatibility(metadata)
    # set default feature information (all columns but target) using
    # metadata
    if self.features is None:
        self._features = metadata.columns.drop(self.target)
    # set metadata
    self._metadata = {
        "nrow": metadata.shape[0],
        "ncol": metadata.shape[1],
        "target_type": {self.target: type(i) for i in metadata[self.target]},
        "feature_type": {
            col: {type(i) for i in metadata[col]} for col in self.features
        },
    }
    return self