class_docstr: A helper class for generating traces in Chrome Trace Format.
class_docstr_tok: ["A","helper","class","for","generating","traces","in","Chrome","Trace","Format","."]
docstr: Adds a region event to the trace.
  
  Args:
    timestamp:  The start timestamp of this region as a long integer.
    duration:  The duration of this region as a long integer.
    pid:  Identifier of the process generating this event as an integer.
    tid:  Identifier of the thread generating this event as an integer.
    category: The event category as a string.
    name:  The event name as a string.
    args:  A JSON-compatible dictionary of event arguments.
docstr_tok: ["Adds","a","region","event","to","the","trace",".","Args",":","timestamp",":","The","start","timestamp","of","this","region","as","a","long","integer",".","duration",":","The","duration","of","this","region","as","a","long","integer",".","pid",":","Identifier","of","the","process","generating","this","event","as","an","integer",".","tid",":","Identifier","of","the","thread","generating","this","event","as","an","integer",".","category",":","The","event","category","as","a","string",".","name",":","The","event","name","as","a","string",".","args",":","A","JSON-compatible","dictionary","of","event","arguments","."]
code: def emit_region(
      self,
      timestamp: int,
      duration: int,
      pid: int,
      tid: int,
      category: str,
      name: str,
      args: Dict[str, Any],
  ) -> None:
      """Adds a region event to the trace.
  
      Args:
        timestamp:  The start timestamp of this region as a long integer.
        duration:  The duration of this region as a long integer.
        pid:  Identifier of the process generating this event as an integer.
        tid:  Identifier of the thread generating this event as an integer.
        category: The event category as a string.
        name:  The event name as a string.
        args:  A JSON-compatible dictionary of event arguments.
      """
      event = self._create_event(
          "X", category, name, pid, tid, timestamp
      )
      event["dur"] = duration
      event["args"] = args
      self._events.append(event)
  
imports: import collections
  import copy
  import json
  import re
  from typing import Any, Dict, List, Optional, Tuple, Union
  from tensorflow.core.framework import step_stats_pb2
  from tensorflow.python.platform import build_info
  from tensorflow.python.platform import tf_logging
label_desc: Use image node_id 5 for calling the _ChromeTraceFormatter obj's underlying member method code with example usage: obj.emit_region(timestamp, duration, pid, tid, category, name, args) without return types