code: def ReadDirectory(self, path, extension='yaml'):
      
      if extension:
        glob_spec = os.path.join(path, '*.{0:s}'.format(extension))
      else:
        glob_spec = os.path.join(path, '*')
  
      for artifact_file in glob.glob(glob_spec):
        for artifact_definition in self.ReadFile(artifact_file):
          yield artifact_definition
docs: Reads artifact definitions from a directory.
  
      This function does not recurse sub directories.
  
      Args:
        path (str): path of the directory to read from.
        extension (Optional[str]): extension of the filenames to read.
  
      Yields:
        ArtifactDefinition: an artifact definition.