class_docstr: A simplification of WBTraceTree and Span to manage a trace - a collection of spans, their metadata and hierarchy.
  
  Args:
      name: (str) The name of the root span.
      kind: (str, optional) The kind of the root span.
      status_code: (str, optional) The status of the root span, either "error" or "success".
      status_message: (str, optional) Any status message associated with the root span.
      metadata: (dict, optional) Any additional metadata for the root span.
      start_time_ms: (int, optional) The start time of the root span in milliseconds.
      end_time_ms: (int, optional) The end time of the root span in milliseconds.
      inputs: (dict, optional) The named inputs of the root span.
      outputs: (dict, optional) The named outputs of the root span.
      model_dict: (dict, optional) A json serializable dictionary containing the model architecture details.
  
  Example:
      .. code-block:: python
      ```
      trace = Trace(
          name="My awesome Model",
          kind="LLM",
          status_code= "SUCCESS",
          metadata={"attr_1": 1, "attr_2": 2,},
          start_time_ms=int(round(time.time() * 1000)),
          end_time_ms=int(round(time.time() * 1000))+1000,
          inputs={"user": "How old is google?"},
          outputs={"assistant": "25 years old"},
          model_dict={"_kind": "openai", "api_type": "azure"}
            )
      run = wandb.init(project=<my_awesome_project>,)
      trace.log("my_trace")
      wandb.finish()
      ```
class_docstr_tok: ["A","simplification","of","WBTraceTree","and","Span","to","manage","a","trace","-","a","collection","of","spans",",","their","metadata","and","hierarchy",".","Args",":","name",":","(","str",")","The","name","of","the","root","span",".","kind",":","(","str",",","optional",")","The","kind","of","the","root","span",".","status_code",":","(","str",",","optional",")","The","status","of","the","root","span",",","either","``","error","''","or","``","success","''",".","status_message",":","(","str",",","optional",")","Any","status","message","associated","with","the","root","span",".","metadata",":","(","dict",",","optional",")","Any","additional","metadata","for","the","root","span",".","start_time_ms",":","(","int",",","optional",")","The","start","time","of","the","root","span","in","milliseconds",".","end_time_ms",":","(","int",",","optional",")","The","end","time","of","the","root","span","in","milliseconds",".","inputs",":","(","dict",",","optional",")","The","named","inputs","of","the","root","span",".","outputs",":","(","dict",",","optional",")","The","named","outputs","of","the","root","span",".","model_dict",":","(","dict",",","optional",")","A","json","serializable","dictionary","containing","the","model","architecture","details",".","Example",":","..","code-block",":",":","python","``","`","trace","=","Trace","(","name=","''","My","awesome","Model","''",",","kind=","''","LLM","''",",","status_code=","``","SUCCESS","''",",","metadata=","{","``","attr_1","''",":","1",",","``","attr_2","''",":","2",",","}",",","start_time_ms=int","(","round","(","time.time","(",")","*","1000",")",")",",","end_time_ms=int","(","round","(","time.time","(",")","*","1000",")",")","+1000",",","inputs=","{","``","user","''",":","``","How","old","is","google","?","``","}",",","outputs=","{","``","assistant","''",":","``","25","years","old","''","}",",","model_dict=","{","``","_kind","''",":","``","openai","''",",","``","api_type","''",":","``","azure","''","}",")","run","=","wandb.init","(","project=","<","my_awesome_project",">",",",")","trace.log","(","``","my_trace","''",")","wandb.finish","(",")","``","`"]
docstr: Add a result to the span of the current trace.
  
  Args:
      inputs: Dictionary of inputs to be logged with the span.
      outputs: Dictionary of outputs to be logged with the span.
  
  Returns:
      The current trace object with the result added to it.
code: def add_inputs_and_outputs(
      self, inputs: dict, outputs: dict
  ) -> "Trace":
      """Add a result to the span of the current trace.
  
      Args:
          inputs: Dictionary of inputs to be logged with the span.
          outputs: Dictionary of outputs to be logged with the span.
  
      Returns:
          The current trace object with the result added to it.
      """
      if self._span.results is None:
          result = Result(inputs=inputs, outputs=outputs)
          self._span.results = [result]
      else:
          result = Result(inputs=inputs, outputs=outputs)
          self._span.results.append(result)
      return self
  
imports: import dataclasses
  import hashlib
  import json
  import typing
  from dataclasses import dataclass, field
  from enum import Enum
  from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union
  import wandb
  import wandb.data_types
  from wandb.sdk.data_types import _dtypes
  from wandb.sdk.data_types.base_types.media import Media
label_desc: Use image node_id 4 for calling the Trace obj's underlying member method code with example usage: obj.add_inputs_and_outputs(inputs, outputs) and returns: self