code: def _property_value(
      node: Union[
          metadata_store_pb2.Artifact,
          metadata_store_pb2.Execution,
          metadata_store_pb2.Context,
      ],
      name: str,
      is_custom_property: bool = False,
  ) -> Optional[Union[int, float, str]]:
      """Given a MLMD node and a (custom) property name, returns its value if any.
  
      Args:
        node: A node in MLMD lineage graph. It is one of MLMD Artifact, Execution,
          or Context.
        name: The key of the properties or custom properties.
        is_custom_property: Indicates whether the name is a custom property.
  
      Returns:
        The value of the property if found in the node; If not, returns None.
      """
      properties = (
          node.custom_properties
          if is_custom_property
          else node.properties
      )
      if name not in properties:
          return None
      if properties[name].WhichOneof("value") == "int_value":
          return properties[name].int_value
      if properties[name].WhichOneof("value") == "float_value":
          return properties[name].double_value
      return properties[name].string_value
  
imports: import enum
  import os
  from typing import Any, Dict, Iterable, List, Optional, Sequence, Union
  import attr
  import ml_metadata
  import tensorflow
  import tensorflow_model_analysis
  from absl import logging
  from ml_metadata.proto import metadata_store_pb2
  from tensorflow_metadata.proto.v0 import statistics_pb2
  from model_card_toolkit import model_card
label_desc: Use image node_id 7 for calling a global function with example usage: _property_value(node, name, is_custom_property) and returns: properties, None, properties, properties