def _elem_from_scoperef(scoperef):
 elem = scoperef[0]
 for lname in scoperef[1]:
  try:
   elem = elem.names[lname]
  except KeyError:
   return None
 return elem

def _elem_from_scoperef ( scoperef ) : elem = scoperef [ 0 ] for lname in scoperef [ 1 ] : try : elem = elem . names [ lname ] except KeyError : return None return elem
a scoperef is .