code: def filter_repos(config, repo_dir=None, vcs_url=None, name=None):
      
      repo_list = []
  
      if repo_dir:
          repo_list.extend(
              [r for r in config if fnmatch.fnmatch(r['parent_dir'], repo_dir)]
          )
  
      if vcs_url:
          repo_list.extend(
              r for r in config if fnmatch.fnmatch(r.get('url', r.get('repo')), vcs_url)
          )
  
      if name:
          repo_list.extend([r for r in config if fnmatch.fnmatch(r.get('name'), name)])
  
      return repo_list
docs: Return a :py:obj:`list` list of repos from (expanded) config file.
  
      repo_dir, vcs_url and name all support fnmatch.
  
      :param config: the expanded repo config in :py:class:`dict` format.
      :type config: dict
      :param repo_dir: directory of checkout location, fnmatch pattern supported
      :type repo_dir: str or None
      :param vcs_url: url of vcs remote, fn match pattern supported
      :type vcs_url: str or None
      :param name: project name, fnmatch pattern supported
      :type name: str or None
      :rtype: list