class_docstr: Emulator specifies how requests and responses are getting transformed.
class_docstr_tok: ["Emulator","specifies","how","requests","and","responses","are","getting","transformed","."]
docstr: Transform request JSON to target format.
  
  Args:
      data: input JSON data as a dictionary.
  
  Returns:
      The transformed input data.
docstr_tok: ["Transform","request","JSON","to","target","format",".","Args",":","data",":","input","JSON","data","as","a","dictionary",".","Returns",":","The","transformed","input","data","."]
code: def normalise_request_json(
      self, data: Dict[Text, Any]
  ) -> Dict[Text, Any]:
      """Transform request JSON to target format.
  
      Args:
          data: input JSON data as a dictionary.
  
      Returns:
          The transformed input data.
      """
      _data = {
          "text": data["text"][0]
          if type(data["text"]) == list  # noqa: E721
          else data["text"]
      }
  
      if data.get("model"):
          if type(data["model"]) == list:  # noqa: E721
              _data["model"] = data["model"][0]
          else:
              _data["model"] = data["model"]
  
      _data["time"] = data["time"] if "time" in data else None
      return _data
  
imports: from typing import Any, Dict, Text
label_desc: Use image node_id 2 for calling the Emulator obj's underlying member method code with example usage: obj.normalise_request_json(data) and returns: _data