def find_variant(name, version=None):
 prod = None
 for prod in SUPPORTED_VARIANTS:
  if (prod.name == name):
   if (version is None):
    return (prod, prod.latest_version())
   for v in prod.versions:
    if (v.name == version):
     return (prod, v)
 return (None, None)

def find_variant ( name , version = None ) : prod = None for prod in SUPPORTED_VARIANTS : if ( prod . name == name ) : if ( version is None ) : return ( prod , prod . latest_version ( ) ) for v in prod . versions : if ( v . name == version ) : return ( prod , v ) return ( None , None )
locate the variant object for the variant given in config file .