def METHOD_NAME(experiment, output, kind, out_type):
    """Create output file name based on experiment name, plot kind and file type.
    If the output filename is provided, it is appended with the file type if filename
    does not already has the corresponding extension. (ex output.name -> output.name.png)
    """
    if not output:
        return f"{experiment.name}-v{experiment.version}_{kind}.{out_type}"
    elif not output.endswith(f".{out_type}"):
        return f"{output}.{out_type}"
    return output