def read_table_field_names(
        file_path
):
    """
    Return the names provided in the '#! FIELDS ...' of the output file.

    Parameters
    ----------
    file_path : str
        The path to the PLUMED output file.

    Returns
    -------
    field_names : List[str]
        ``field_names[i]`` is the field name for the ``i``-th column of
        the table in the output file.

    """
    with open(file_path, 'r') as f:
        for line in f:
            if line.startswith('#! FIELDS'):
                return line.split()[2:]

    # No FIELDS record could be found.
    raise ValueError(f"No '#! FIELDS' record could be found in file {file_path}")