def GetClassLookupDict(classes, labels):
 paths = {}
 for cls in classes:
  category = getattr(cls, 'category', None)
  if category:
   for (path, label) in InterpolatePaths(category, labels).items():
    paths[path] = (cls, label)
 return paths

def GetClassLookupDict ( classes , labels ) : paths = { } for cls in classes : category = getattr ( cls , 'category' , None ) if category : for ( path , label ) in InterpolatePaths ( category , labels ) . items ( ) : paths [ path ] = ( cls , label ) return paths
build a path->class lookup dict .