def _getitem_from_frame(f_locals, key, default=None):
 try:
  return f_locals[key]
 except Exception:
  return default

def _getitem_from_frame ( f_locals , key , default = None ) : try : return f_locals [ key ] except Exception : return default
f_locals is not guaranteed to have .