def write_data(path, contents):
    """Write data to a file object

    Parameters
    ----------
    path: str
        Path to file object.
    contents: str, list, tuple
        Content to be written to the file.
    """
    with open(path, 'w') as data_file:
        data_file.write(contents)
    try:
        with open(path, 'w') as data_file:
            if isinstance(contents, str):
                data_file.write(contents)
            elif isinstance(contents, (tuple, list)):
                data_file.write('\n'.join(contents))
    except FileNotFoundError:
        raise FileNotFoundError(
            f'File Object Could Not Be Found at path {path}')
