def METHOD_NAME(*args, **kargs):
    # We need to make sure that the arguments are correctly mapped to inputs
    # regardless of the passing order
    signature = inspect.signature(func)
    bound_arguments = signature.bind(*args, **kargs)
    graph_ops_group = Graph(func.__name__)
    graph_ops_group.inputs = list(bound_arguments.arguments.values())
    graph_ops_group.arguments = bound_arguments.arguments
    for input in graph_ops_group.inputs:
        if not isinstance(input, PipelineParam):
            raise ValueError('arguments to ' + func.__name__ +
                             ' should be PipelineParams.')
    # Entering the Graph Context
    with graph_ops_group:
        # Call the function
        if not graph_ops_group.recursive_ref:
            func(*args, **kargs)
    return graph_ops_group