parameters: (name='builtin')
return_statement: return adapter
docstring: Return an SSL adapter class for the given name.
docstring_summary: Return an SSL adapter class for the given name.
docstring_tokens: Return an SSL adapter class for the given name .
function: def get_ssl_adapter_class(name='builtin'):
      """Return an SSL adapter class for the given name."""
      adapter = ssl_adapters[name.lower()]
      if isinstance(adapter, six.string_types):
          last_dot = adapter.rfind('.')
          attr_name = adapter[last_dot + 1:]
          mod_path = adapter[:last_dot]
  
          try:
              mod = sys.modules[mod_path]
              if mod is None:
                  raise KeyError()
          except KeyError:
              # The last [''] is important.
              mod = __import__(mod_path, globals(), locals(), [''])
  
          # Let an AttributeError propagate outward.
          try:
              adapter = getattr(mod, attr_name)
          except AttributeError:
              raise AttributeError("'%s' object has no attribute '%s'"
                                   % (mod_path, attr_name))
  
      return adapter
function_tokens: def get_ssl_adapter_class ( name = 'builtin' ) : adapter = ssl_adapters [ name . lower ( ) ] if isinstance ( adapter , six . string_types ) : last_dot = adapter . rfind ( '.' ) attr_name = adapter [ last_dot + 1 : ] mod_path = adapter [ : last_dot ] try : mod = sys . modules [ mod_path ] if mod is None : raise KeyError ( ) except KeyError : # The last [''] is important. mod = __import__ ( mod_path , globals ( ) , locals ( ) , [ '' ] ) # Let an AttributeError propagate outward. try : adapter = getattr ( mod , attr_name ) except AttributeError : raise AttributeError ( "'%s' object has no attribute '%s'" % ( mod_path , attr_name ) ) return adapter