<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def detect_duplicate_repos(repos1, repos2):
 """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 """

    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