code: def _make_value_pb(value):
      
      if value is None:
          return Value(null_value="NULL_VALUE")
      if isinstance(value, (list, tuple)):
          return Value(list_value=_make_list_value_pb(value))
      if isinstance(value, bool):
          return Value(bool_value=value)
      if isinstance(value, six.integer_types):
          return Value(string_value=str(value))
      if isinstance(value, float):
          if math.isnan(value):
              return Value(string_value="NaN")
          if math.isinf(value):
              if value > 0:
                  return Value(string_value="Infinity")
              else:
                  return Value(string_value="-Infinity")
          return Value(number_value=value)
      if isinstance(value, datetime_helpers.DatetimeWithNanoseconds):
          return Value(string_value=value.rfc3339())
      if isinstance(value, datetime.datetime):
          return Value(string_value=_datetime_to_rfc3339(value))
      if isinstance(value, datetime.date):
          return Value(string_value=value.isoformat())
      if isinstance(value, six.binary_type):
          value = _try_to_coerce_bytes(value)
          return Value(string_value=value)
      if isinstance(value, six.text_type):
          return Value(string_value=value)
      if isinstance(value, ListValue):
          return Value(list_value=value)
      raise ValueError("Unknown type: %s" % (value,))
docs: Helper for :func:`_make_list_value_pbs`.
  
      :type value: scalar value
      :param value: value to convert
  
      :rtype: :class:`~google.protobuf.struct_pb2.Value`
      :returns: value protobufs
      :raises ValueError: if value is not of a known scalar type.