def replacePath(match):
    groups = match.groupdict()
    file = groups.get('file', '')
    if file:
        dir = groups.get('dir', '')
        if dir:
            dir = '<py_dir>/' 
        path = '%s%s.py' % (dir, file)
    else:
        path = groups['special_file']
    return path
dataset/ETHPy150Open CountZer0/PipelineConstructionSet/python/maya/site-packages/pymel-1.0.3/tests/test_mayaIntegration.py/replacePath/original