def config_from_object(bilby_object):
    """Extract the configuration file stored within a `bilby.core.result.Result`
    object (or alike)

    Parameters
    ----------
    bilby_object: bilby.core.result.Result (or alike)
        a bilby.core.result.Result object (or alike) you wish to extract the
        configuration file from
    """
    config = {}
    if bilby_object.meta_data is not None:
        if "command_line_args" in bilby_object.meta_data.keys():
            config = {
                "config": bilby_object.meta_data["command_line_args"]
            }
    return config