def CreateRequest(methodname, params, ident=''):
  """Create a valid JSON-RPC request.

  Args:
    methodname: The name of the remote method to invoke.
    params: The parameters to pass to the remote method. This should be a
        list or tuple and able to be encoded by the default JSON parser.

  Returns:
    A valid JSON-RPC request object.
  """
  request = {
      'jsonrpc': '2.0',
      'method': methodname,
      'params': params,
      'id': ident
      }

  return request