code: def _filter(client, names=None, authors=None, include=None, exclude=None):
      
      if isinstance(authors, str):
          authors = set(authors.split(','))
  
      if isinstance(authors, list) or isinstance(authors, tuple):
          authors = set(authors)
  
      records = []
      for path_, dataset in client.datasets.items():
          if not names or dataset.name in names:
              for file_ in dataset.files.values():
                  file_.dataset = dataset.name
  
                  path_ = file_.full_path.relative_to(client.path)
                  match = _include_exclude(path_, include, exclude)
  
                  if authors:
                      match = match and authors.issubset({
                          author.name
                          for author in file_.authors
                      })
  
                  if match:
                      records.append(file_)
  
      return sorted(records, key=lambda file_: file_.added)
docs: Filter dataset files by specified filters.
  
      :param names: Filter by specified dataset names.
      :param authors: Filter by authors.
      :param include: Include files matching file pattern.
      :param exclude: Exclude files matching file pattern.