code: def sampling_to_proto(sampling):
      if sampling == "linear":
          return protos.get_proto().Sampling.LINEAR
      if sampling == "log":
          return protos.get_proto().Sampling.LOG
      if sampling == "reverse_log":
          return protos.get_proto().Sampling.REVERSE_LOG
      raise ValueError(
          "Expected sampling to be 'linear', 'log', or 'reverse_log'. "
          f"Received: '{sampling}'."
      )
  
imports: import math
  from keras_tuner import protos
label_desc: Use image node_id 2 for calling a global function with example usage: sampling_to_proto(sampling) and returns: protos, protos, protos