code: def _set_domain(name, feature, domain):
      """Set the domain of a Feature proto."""
      if domain is None:
          return
  
      if isinstance(domain, schema_pb2.IntDomain):
          feature.int_domain.CopyFrom(domain)
      elif isinstance(domain, schema_pb2.StringDomain):
          feature.string_domain.CopyFrom(domain)
      elif isinstance(domain, schema_pb2.FloatDomain):
          feature.float_domain.CopyFrom(domain)
      else:
          raise ValueError(
              'Feature "{}" has invalid domain {}'.format(name, domain)
          )
  
imports: import dataclasses
  import typing
  from typing import Dict, List, Mapping, Optional, Tuple, Union
  import tensorflow
  from tensorflow_transform import common_types
  from tensorflow_transform.tf_metadata import schema_utils_legacy
  from tfx_bsl.tfxio import tensor_representation_util
  from tensorflow_metadata.proto.v0 import path_pb2
  from tensorflow_metadata.proto.v0 import schema_pb2
label_desc: Use image node_id 6 for calling a global function with example usage: _set_domain(name, feature, domain) without return types