code: def command(name, nargs=0, complete=None, range=None, count=None, bang=False,
              register=False, sync=False, allow_nested=False, eval=None):
      
      def dec(f):
          f._nvim_rpc_method_name = 'command:{}'.format(name)
          f._nvim_rpc_sync = sync
          f._nvim_bind = True
          f._nvim_prefix_plugin_path = True
  
          opts = {}
  
          if range is not None:
              opts['range'] = '' if range is True else str(range)
          elif count is not None:
              opts['count'] = count
  
          if bang:
              opts['bang'] = ''
  
          if register:
              opts['register'] = ''
  
          if nargs:
              opts['nargs'] = nargs
  
          if complete:
              opts['complete'] = complete
  
          if eval:
              opts['eval'] = eval
  
          if not sync and allow_nested:
              rpc_sync = "urgent"
          else:
              rpc_sync = sync
  
          f._nvim_rpc_spec = {
              'type': 'command',
              'name': name,
              'sync': rpc_sync,
              'opts': opts
          }
          return f
      return dec
docs: Tag a function or plugin method as a Nvim command handler.