code: def _get_structural_runtime_parameter_value(
      structural_runtime_parameter: pipeline_pb2.StructuralRuntimeParameter,
      parameter_bindings: Mapping[str, types.Property],
      populated_values: Dict[str, Optional[types.Property]],
  ) -> Optional[str]:
      """Populates the value for a StructuralRuntimeParameter when possible.
  
      Only populates the value when all parts in the structural runtime parameter
      are resolved to values.
  
      Args:
        structural_runtime_parameter: The StructuralRuntimeParameter message as the
          template.
        parameter_bindings: Parameter bindings to substitute runtime parameter
          placeholders in the StructuralRuntimeParameter.
        populated_values: A dict of all runtime parameters to their populated
          values.
  
      Returns:
        A string if all parts are resolved. Returns None otherwise.
      """
      parts = []
      for part in structural_runtime_parameter.parts:
          if part.WhichOneof("value") == "constant_value":
              parts.append(part.constant_value)
          else:
              part_value = _get_runtime_parameter_value(
                  part.runtime_parameter, parameter_bindings
              )
              populated_values[part.runtime_parameter.name] = part_value
              if part_value is None:
                  return None
              parts.append(part_value)
  
      # If we reach here, all parts are resolved to strings, concatenates them
      # together and use that as the final value.
      return "".join(parts)
  
file_path: tfx/tfx/orchestration/portable/runtime_parameter_utils.py
imports: from typing import Mapping, Optional, cast, Dict
  from tfx import types
  from tfx.orchestration import data_types_utils
  from tfx.proto.orchestration import pipeline_pb2
  from google.protobuf import descriptor
  from google.protobuf import message
label_desc: Use image node_id 3 for calling a global function with example usage: _get_structural_runtime_parameter_value(structural_runtime_parameter, parameter_bindings, populated_values) and returns: str, None