code: def primitive_or_expr(
      value: Union[
          ExecutionVariable,
          Expression,
          PrimitiveType,
          Parameter,
          Properties,
          StepOutput,
      ]
  ) -> Union[Dict[str, str], PrimitiveType]:
      """Provide the expression of the value or return value if it is a primitive.
  
      Args:
          value (Union[ConditionValueType, PrimitiveType]): The value to evaluate.
      Returns:
          Either the expression of the value or the primitive value.
      """
      if is_pipeline_variable(value):
          return value.expr
      return value
  
imports: from __future__ import absolute_import
  import abc
  from enum import Enum
  from typing import Dict, List, Union
  import attr
  from sagemaker.workflow import is_pipeline_variable
  from sagemaker.workflow.entities import DefaultEnumMeta, Entity, Expression, PrimitiveType, RequestType
  from sagemaker.workflow.execution_variables import ExecutionVariable
  from sagemaker.workflow.parameters import Parameter
  from sagemaker.workflow.properties import Properties
  from sagemaker.workflow.entities import PipelineVariable
  from sagemaker.workflow.step_outputs import StepOutput
label_desc: Use image node_id 1 for calling a global function with example usage: primitive_or_expr(value) and returns: value, value