def copy_file(in_file, out_file=None):
    """
    Create a function to copy a file that can be modified by a following node
    without changing the original file.
    """
    import os
    import shutil
    if out_file is None:
        out_file = os.path.join(os.getcwd(), os.path.basename(in_file))
    if type(in_file) is list and len(in_file) == 1:
        in_file = in_file[0]
    out_file = os.path.abspath(out_file)
    in_file = os.path.abspath(in_file)
    print('copying {0} to {1}'.format(in_file, out_file))
    shutil.copy(in_file, out_file)
    return out_file
