def _should_keep_module(name):
  """Returns True if the module should be retained after sandboxing."""
  return (name in ('__builtin__', 'sys', 'codecs', 'encodings', 'site',
                   'google') or
          name.startswith('google.') or name.startswith('encodings.') or

          # Making mysql available is a hack to make the CloudSQL functionality
          # work.
          'mysql' in name.lower())