class_docstr: A class for visualizing execution timelines of TensorFlow steps.
class_docstr_tok: ["A","class","for","visualizing","execution","timelines","of","TensorFlow","steps","."]
docstr: Allocate fake process ids for each device in the step_stats_pb2.StepStats.
docstr_tok: ["Allocate","fake","process","ids","for","each","device","in","the","step_stats_pb2.StepStats","."]
code: def _allocate_pids(self) -> None:
      """Allocate fake process ids for each device in the step_stats_pb2.StepStats."""
      self._allocators_pid = self._alloc_pid()
      self._chrome_trace.emit_pid("Allocators", self._allocators_pid)
  
      # Add processes in the Chrome trace to show compute and data activity.
      for dev_stats in self._step_stats.dev_stats:
          device_pid = self._alloc_pid()
          self._device_pids[dev_stats.device] = device_pid
          tensors_pid = self._alloc_pid()
          self._tensor_pids[dev_stats.device] = tensors_pid
          self._chrome_trace.emit_pid(
              dev_stats.device + " Compute", device_pid
          )
          self._chrome_trace.emit_pid(
              dev_stats.device + " Tensors", tensors_pid
          )
  
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 11 for calling the Timeline obj's underlying member method code with example usage: obj._allocate_pids() without return types