code: def get_arguments(
      params: Union[List, Dict, object] = NOPARAMS, context: Any = NOCONTEXT
  ) -> Tuple[List, Dict]:
      
      positionals, nameds = [], {}  # type: list, dict
      if params is not NOPARAMS:
          assert isinstance(params, (list, dict))
          if isinstance(params, list):
              positionals, nameds = (params, {})
          elif isinstance(params, dict):
              positionals, nameds = ([], params)
  
      # If context data was passed, include it as the first positional argument.
      if context is not NOCONTEXT:
          positionals = [context] + positionals
  
      return (positionals, nameds)
docs: Get the positional and keyword arguments from a request.
  
      Takes the 'params' part of a JSON-RPC request and converts it to either positional
      or named arguments usable in a Python function call. Note that a JSON-RPC request
      can only have positional _or_ named arguments, but not both. See
      http://www.jsonrpc.org/specification#parameter_structures
  
      Args:
          params: The 'params' part of the JSON-RPC request (should be a list or dict).
              The 'params' value can be a JSON array (Python list), object (Python dict),
              or None.
          context: Optionally include some context data, which will be included as the
              first positional arguments passed to the method.
  
      Returns:
          A two-tuple containing the positional (in a list, or None) and named (in a dict,
          or None) arguments, extracted from the 'params' part of the request.