<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def copy_files(self, files=None, path_patterns=None, symbolic_links=True, root=None, conflicts='fail', **kwargs):
 """ Copies one or more BIDSFiles to new locations defined by each BIDSFile's entities and the specified path_patterns. Args: files (list):
 Optional list of BIDSFile objects to write out. If none provided, use files from running a get() query using remaining **kwargs. path_patterns (str, list):
 Write patterns to pass to each file's write_file method. symbolic_links (bool):
 Whether to copy each file as a symbolic link or a deep copy. root (str):
 Optional root directory that all patterns are relative to. Defaults to current working directory. conflicts (str):
 Defines the desired action when the output path already exists. Must be one of: 'fail': raises an exception 'skip' does nothing 'overwrite': overwrites the existing file 'append': adds a suffix to each file copy, starting with 1 kwargs (kwargs):
 Optional key word arguments to pass into a get() query. """

        _files = self.get(return_type='objects', **kwargs)
        if files:
            _files = list(set(files).intersection(_files))

        for f in _files:
            f.copy(path_patterns, symbolic_link=symbolic_links,
                   root=self.root, conflicts=conflicts)