code: def _nxapi_request(commands,
                     method='cli_conf',
                     **kwargs):
      '''
      Helper function to send exec and config requests over NX-API.
  
      commands
          The exec or config commands to be sent.
  
      method: ``cli_show``
          ``cli_show_ascii``: Return raw test or unstructured output.
          ``cli_show``: Return structured output.
          ``cli_conf``: Send configuration commands to the device.
          Defaults to ``cli_conf``.
      '''
      if salt.utils.platform.is_proxy():
          return __proxy__['nxos._nxapi_request'](commands, method=method, **kwargs)
      else:
          api_kwargs = __salt__['config.get']('nxos', {})
          api_kwargs.update(**kwargs)
          return __utils__['nxos.nxapi_request'](commands, method=method, **api_kwargsf _nxapi_request(commands,
                     method='cli_conf',
                     **kwargs):
      '''
      Helper function to send exec and config requests over NX-API.
  
      commands
          The exec or config commands to be sent.
  
      method: ``cli_show``
          ``cli_show_ascii``: Return raw test or unstructured output.
          ``cli_show``: Return structured output.
          ``cli_conf``: Send configuration commands to the device.
          Defaults to ``cli_conf``.
      '''
      if salt.utils.platform.is_proxy():
          return __proxy__['nxos._nxapi_request'](commands, method=method, **kwargs)
      else:
          api_kwargs = __salt__['config.get']('nxos', {})
          api_kwargs.update(**kwargs)
          return __utils__['nxos.nxapi_request'](commands, method=method, **api_kwargs)
docs: Helper function to send exec and config requests over NX-API.
  
      commands
          The exec or config commands to be sent.
  
      method: ``cli_show``
          ``cli_show_ascii``: Return raw test or unstructured output.
          ``cli_show``: Return structured output.
          ``cli_conf``: Send configuration commands to the device.
          Defaults to ``cli_conf``.