code: def get_stateful_working_dir_index(
      execution: Optional[metadata_store_pb2.Execution] = None,
  ) -> str:
      """Gets stateful working directory index.
  
      Returned the UUID stored in the execution. If the execution is not provided or
      UUID is not found in the execution, a new UUID will be returned.
  
      Args:
        execution: execution that stores the stateful_working_dir_index.
  
      Returns:
        an index for stateful working dir.
      """
      index = None
      if (
          execution is not None
          and constants.STATEFUL_WORKING_DIR_INDEX
          in execution.custom_properties
      ):
          index = data_types_utils.get_metadata_value(
              execution.custom_properties[
                  constants.STATEFUL_WORKING_DIR_INDEX
              ]
          )
      return str(index) if index is not None else str(uuid.uuid4())
  
imports: import collections
  import copy
  import datetime
  import os
  from typing import Any, Dict, List, Mapping, Optional, Sequence, Union
  import uuid
  from absl import logging
  from tfx import types
  from tfx import version
  from tfx.dsl.io import fileio
  from tfx.orchestration import data_types_utils
  from tfx.orchestration import node_proto_view
  from tfx.orchestration.experimental.core import constants
  from tfx.orchestration.portable import data_types
  from tfx.proto.orchestration import execution_result_pb2
  from tfx.proto.orchestration import pipeline_pb2
  from tfx.types import artifact
  from tfx.types import artifact_utils
  from tfx.types.value_artifact import ValueArtifact
  from tfx.utils import proto_utils
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 11 for calling a global function with example usage: get_stateful_working_dir_index(execution) and returns: unknown