def _GetModuleOrNone(module_name):
  """Returns a module if it exists or None."""
  module = None
  if module_name:
    try:
      module = __import__(module_name)
    except __HOLE__:
      pass
    else:
      for name in module_name.split('.')[1:]:
        module = getattr(module, name)
  return module
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/runtime/cgi.py/_GetModuleOrNone