def log_artifact_task(parent, **kwargs):
    """Log an artifact within a `prefect` flow.

    This `prefect` task can be used within a flow to
    log an artifact to an existing project or experiment.

    Parameters
    ----------
    parent : rubicon.client.Project or rubicon.client.Experiment
        The project or experiment to log the artifact to.
    kwargs : dict
        Keyword arguments to be passed to
        `Project.log_artifact` or `Experiment.log_artifact`.

    Returns
    -------
    rubicon.client.Artifact
        The logged artifact.
    """
    return parent.log_artifact(**kwargs)