code: def ParentAndBaseName(path):
    
    dirname, basename = os.path.split(path)
    dirname = dirname.rstrip(os.path.sep)
    if os.path.altsep:
      dirname = dirname.rstrip(os.path.altsep)
    _, parentname = os.path.split(dirname)
    return os.path.join(parentname, basename)
docs: Given a path return only the parent name and file name as a string.