code: def overlay_gateway_type(self, **kwargs):
          
  
          callback = kwargs.pop('callback', self._callback)
          get_config = kwargs.pop('get', False)
          if not get_config:
              gw_name = kwargs.pop('gw_name')
              gw_type = kwargs.pop('gw_type')
              gw_args = dict(name=gw_name, gw_type=gw_type)
              overlay_gw = getattr(self._tunnels, 'overlay_gateway_gw_type')
              config = overlay_gw(**gw_args)
  
          if get_config:
              overlay_gw = getattr(self._tunnels, 'overlay_gateway_gw_type')
              config = overlay_gw(name='', gw_type='')
              output = callback(config, handler='get_config')
              if output.data.find('.//{*}name') is not None:
                  gwtype = output.data.find('.//{*}gw-type').text
                  return gwtype
              else:
                  return None
  
          return callback(config)
docs: Configure Overlay Gateway Type on vdx switches
  
          Args:
              gw_name: Name of Overlay Gateway
              gw_type: Type of Overlay Gateway(hardware-vtep/
                       layer2-extension/nsx)
              get (bool): Get config instead of editing config. (True, False)
              delete (bool): True, delete the overlay gateway type.
                             (True, False)
              callback (function): A function executed upon completion of the
                  method.  The only parameter passed to `callback` will be the
                  ``ElementTree`` `config`.
  
          Returns:
              Return value of `callback`.
  
          Raises:
              KeyError: if `gw_name`, 'gw_type' is not passed.
              ValueError: if `gw_name`, 'gw_type' is invalid.
  
          Examples:
              >>> import pynos.device
              >>> conn = ('10.24.39.211', '22')
              >>> auth = ('admin', 'password')
              >>> with pynos.device.Device(conn=conn, auth=auth) as dev:
              ...     output = dev.interface.overlay_gateway_type(gw_name='Leaf',
              ...              gw_type='layer2-extension')
              ...     output = dev.interface.overlay_gateway_name(get=True)