<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def put_fileset(self, fileset):
 """ Inserts or updates a fileset in the repository """

        target_path = self.fileset_path(fileset)
        if op.isfile(fileset.path):
            shutil.copyfile(fileset.path, target_path)
            # Copy side car files into repository
            for aux_name, aux_path in fileset.format.default_aux_file_paths(
                    target_path).items():
                shutil.copyfile(self.aux_file[aux_name], aux_path)
        elif op.isdir(fileset.path):
            if op.exists(target_path):
                shutil.rmtree(target_path)
            shutil.copytree(fileset.path, target_path)
        else:
            assert False