def METHOD_NAME(self, files, unique=False):
    '''Extend the dataset. If unique, then only add files which are not
    already in the dataset.'''
    from GangaCore.GPIDev.Base import ReadOnlyObjectError
    if not hasattr(files, "__getitem__"):
        raise GangaException('Argument "files" must be a iterable.')
    if self._getParent() is not None and self._getParent()._readonly():
        raise ReadOnlyObjectError(
            'object Job#%s  is read-only and attribute "%s/inputdata" cannot be modified now' % (self._getParent().id, getName(self)))
    names = self.getFileNames()
    files = [f for f in files]  # just in case they extend w/ self
    for f in files:
        if unique and f.name in names:
            continue
        self.files.append(f)