code: def sort_request(request: Dict[str, Any]) -> OrderedDict:
      
      sort_order = ["jsonrpc", "method", "params", "id"]
      return OrderedDict(sorted(request.items(), key=lambda k: sort_order.index(k[0])))
docs: Sort a JSON-RPC request dict.
  
      This has no effect other than making the request nicer to read.
  
          >>> json.dumps(sort_request(
          ...     {'id': 2, 'params': [2, 3], 'method': 'add', 'jsonrpc': '2.0'}))
          '{"jsonrpc": "2.0", "method": "add", "params": [2, 3], "id": 2}'
  
      Args:
          request: JSON-RPC request in dict format.