def METHOD_NAME(*args, **kwd):
    # Grab the logging keyword, if it is present.
    log_result = kwd.pop(_LOG_ARGUMENT, True)
    result = func(*args, **kwd)
    if not log_result:
        # No need to add metadata....
        meta_dict = {}
    elif log_result is not True:
        meta_dict = _metadata_to_dict(log_result)
    else:
        # Logging is not turned off, but user did not provide a value
        # so construct one unless the config parameter auto_logging is set to False
        if ccdproc.conf.auto_logging:
            key = func.__name__
            # Get names of arguments, which may or may not have
            # been called as keywords.
            positional_args = original_args[:len(args)]
            all_args = chain(zip(positional_args, args), kwd.items())
            all_args = ["{0}={1}".format(name,
                                        _replace_array_with_placeholder(val))
                        for name, val in all_args]
            log_val = ", ".join(all_args)
            log_val = log_val.replace("\n", "")
            meta_dict = {key: log_val}
        else:
            meta_dict = {}
    for k, v in meta_dict.items():
        _insert_in_metadata_fits_safe(result, k, v)
    return result