def format_file_name(input_file, output_file = None):
    """
    Determine the name of the file to write to disk.

    If the user has specified an output file name and extension, use this to
    write the file. If they haven't, append "_no_grave" onto the name of the
    input file and add the .h5m extension.

    Input:
    ______
       input_file: str
           User supplied data file location.
       output_file: str
           Optional user supplied output file name and extension.

    Returns:
    ________
       file_name: str
           The name of the file to write to disk.
    """

    if output_file is None:
        input_list = input_file.split("/")
        file_name = '.'.join(input_list[-1].split(".")[:-1])
        output_file = file_name + "_no_grave.h5m"

    return output_file