parameters: (self, graph, ops_in_exec_path)
return_statement: return tensor_trace_order
docstring: Work needs to be done prior to TPU or CPU tracing.
  
      Args:
        graph: tf.graph
        ops_in_exec_path: Set of operations in the execution path.
      Returns:
        An instance of tensor_tracer_report.TensorTraceOrder, containing list of
        tensors to be traced with their topological order information.
docstring_summary: Work needs to be done prior to TPU or CPU tracing.
docstring_tokens: Work needs to be done prior to TPU or CPU tracing .
function: def _determine_trace_and_create_report(self, graph, ops_in_exec_path):
      """Work needs to be done prior to TPU or CPU tracing.
  
      Args:
        graph: tf.graph
        ops_in_exec_path: Set of operations in the execution path.
      Returns:
        An instance of tensor_tracer_report.TensorTraceOrder, containing list of
        tensors to be traced with their topological order information.
      """
  
      self._check_trace_files()
  
      graph_order = tensor_tracer_report.sort_tensors_and_ops(graph)
      tensor_trace_points = graph.get_collection(_TENSOR_TRACER_COLLECTION)
  
      report_handler = tensor_tracer_report.TTReportHandle()
      traced_tensors = self._determine_and_instrument_traced_tensors(
          graph_order, ops_in_exec_path, tensor_trace_points, report_handler)
  
      tensor_trace_order = tensor_tracer_report.TensorTraceOrder(graph_order,
                                                                 traced_tensors)
      num_signatures = self._num_signature_dimensions()
      if num_signatures:
        self._create_or_get_tensor_values_cache(_TT_SUMMARY_TAG,
                                                graph,
                                                [len(traced_tensors),
                                                 num_signatures])
      if self._parameters.trace_mode in (
          tensor_tracer_flags.TRACE_MODE_SUMMARY,
          tensor_tracer_flags.TRACE_MODE_FULL_TENSOR_SUMMARY):
        report_proto = report_handler.create_report_proto(self._tt_config,
                                                          self._parameters,
                                                          tensor_trace_order,
                                                          tensor_trace_points,
                                                          self._signature_types())
        report_handler.write_report_proto(report_proto, self._parameters)
      else:
        report_handler.create_report(self._tt_config, self._parameters,
                                     tensor_trace_order, tensor_trace_points)
      return tensor_trace_order
function_tokens: def _determine_trace_and_create_report ( self , graph , ops_in_exec_path ) : self . _check_trace_files ( ) graph_order = tensor_tracer_report . sort_tensors_and_ops ( graph ) tensor_trace_points = graph . get_collection ( _TENSOR_TRACER_COLLECTION ) report_handler = tensor_tracer_report . TTReportHandle ( ) traced_tensors = self . _determine_and_instrument_traced_tensors ( graph_order , ops_in_exec_path , tensor_trace_points , report_handler ) tensor_trace_order = tensor_tracer_report . TensorTraceOrder ( graph_order , traced_tensors ) num_signatures = self . _num_signature_dimensions ( ) if num_signatures : self . _create_or_get_tensor_values_cache ( _TT_SUMMARY_TAG , graph , [ len ( traced_tensors ) , num_signatures ] ) if self . _parameters . trace_mode in ( tensor_tracer_flags . TRACE_MODE_SUMMARY , tensor_tracer_flags . TRACE_MODE_FULL_TENSOR_SUMMARY ) : report_proto = report_handler . create_report_proto ( self . _tt_config , self . _parameters , tensor_trace_order , tensor_trace_points , self . _signature_types ( ) ) report_handler . write_report_proto ( report_proto , self . _parameters ) else : report_handler . create_report ( self . _tt_config , self . _parameters , tensor_trace_order , tensor_trace_points ) return tensor_trace_order