original_docstring: 
      Create a SuperviseAndProxyHandler subclass with given parameters
      
docstring: Create a SuperviseAndProxyHandler subclass with given parameters
docstring_tokens: Create a SuperviseAndProxyHandler subclass with given parameters
code: def _make_serverproxy_handler(name, command, environment, timeout, absolute_url, port, mappath, request_headers_override):
      """
      Create a SuperviseAndProxyHandler subclass with given parameters
      """
      # FIXME: Set 'name' properly
      class _Proxy(SuperviseAndProxyHandler):
          def __init__(self, *args, **kwargs):
              super().__init__(*args, **kwargs)
              self.name = name
              self.proxy_base = name
              self.absolute_url = absolute_url
              self.requested_port = port
              self.mappath = mappath
  
          @property
          def process_args(self):
              return {
                  'port': self.port,
                  'base_url': self.base_url,
              }
  
          def _render_template(self, value):
              args = self.process_args
              if type(value) is str:
                  return value.format(**args)
              elif type(value) is list:
                  return [self._render_template(v) for v in value]
              elif type(value) is dict:
                  return {
                      self._render_template(k): self._render_template(v)
                      for k, v in value.items()
                  }
              else:
                  raise ValueError('Value of unrecognized type {}'.format(type(value)))
  
          def _realize_rendered_template(self, attribute):
              '''Call any callables, then render any templated values.'''
              if callable(attribute):
                  attribute = self._render_template(
                      call_with_asked_args(attribute, self.process_args)
                  )
              return self._render_template(attribute)
  
          def get_cmd(self):
              return self._realize_rendered_template(command)
  
          def get_env(self):
              return self._realize_rendered_template(environment)
  
          def get_request_headers_override(self):
              return self._realize_rendered_template(request_headers_override)
  
          def get_timeout(self):
              return timeout
  
      return _Proxy
code_tokens: def _make_serverproxy_handler ( name , command , environment , timeout , absolute_url , port , mappath , request_headers_override ) : class _Proxy ( SuperviseAndProxyHandler ) : def __init__ ( self , * args , ** kwargs ) : super ( ) . __init__ ( * args , ** kwargs ) self . name = name self . proxy_base = name self . absolute_url = absolute_url self . requested_port = port self . mappath = mappath @ property def process_args ( self ) : return { 'port' : self . port , 'base_url' : self . base_url , } def _render_template ( self , value ) : args = self . process_args if type ( value ) is str : return value . format ( ** args ) elif type ( value ) is list : return [ self . _render_template ( v ) for v in value ] elif type ( value ) is dict : return { self . _render_template ( k ) : self . _render_template ( v ) for k , v in value . items ( ) } else : raise ValueError ( 'Value of unrecognized type {}' . format ( type ( value ) ) ) def _realize_rendered_template ( self , attribute ) : '''Call any callables, then render any templated values.''' if callable ( attribute ) : attribute = self . _render_template ( call_with_asked_args ( attribute , self . process_args ) ) return self . _render_template ( attribute ) def get_cmd ( self ) : return self . _realize_rendered_template ( command ) def get_env ( self ) : return self . _realize_rendered_template ( environment ) def get_request_headers_override ( self ) : return self . _realize_rendered_template ( request_headers_override ) def get_timeout ( self ) : return timeout return _Proxy
short_docstring: Create a SuperviseAndProxyHandler subclass with given parameters
short_docstring_tokens: Create a SuperviseAndProxyHandler subclass with given parameters
comment: """
      Create a SuperviseAndProxyHandler subclass with given parameters
      """$SEP$# FIXME: Set 'name' properly$SEP$'''Call any callables, then render any templated values.'''