def __init__(self,
               name=None,
               files=None,
               globs=None,
               rglobs=None,
               zglobs=None,
               excludes=None,
               **kwargs):
    super(Sources, self).__init__(name=name, files=files, globs=globs, rglobs=rglobs, zglobs=zglobs,
                                  **kwargs)
    if files and self.extensions:
      for f in files:
        if not self._accept_file(f):
          # TODO: TargetDefinitionError or similar
          raise ValueError('Path `{}` selected by {} is not a {} file.'.format(
            f, self, self.extensions))
    self.excludes = excludes
:param string name: An optional name of this set of sources if the set is top-level for sharing.
dataset/ETHPy150Open pantsbuild/pants/src/python/pants/engine/exp/examples/sources.py/Sources.__init__