code: def detect_duplicate_repos(repos1, repos2):
      
      dupes = []
      path_dupe_repos = []
  
      curpaths = [r['repo_dir'] for r in repos1]
      newpaths = [r['repo_dir'] for r in repos2]
      path_duplicates = list(set(curpaths).intersection(newpaths))
  
      if not path_duplicates:
          return None
  
      path_dupe_repos.extend(
          [r for r in repos2 if any(r['repo_dir'] == p for p in path_duplicates)]
      )
  
      if not path_dupe_repos:
          return None
  
      for n in path_dupe_repos:
          currepo = next((r for r in repos1 if r['repo_dir'] == n['repo_dir']), None)
          if n['url'] != currepo['url']:
              dupes += (n, currepo)
      return dupes
docs: Return duplicate repos dict if repo_dir same and vcs different.
  
      :param repos1: list of repo expanded dicts
      :type repos1: list of :py:dict
      :param repos2: list of repo expanded dicts
      :type repos2: list of :py:dict
      :rtype: list of dicts or None
      :returns: Duplicate lists