docstr: Writes SavedModel to compute y = wx + 1, with w trainable.
docstr_tok: ["Writes","SavedModel","to","compute","y","=","wx","+","1",",","with","w","trainable","."]
code: def _model(self):
      """Writes SavedModel to compute y = wx + 1, with w trainable."""
      inp = tf.keras.layers.Input(shape=(1,), dtype=tf.float32)
      times_w = tf.keras.layers.Dense(
          units=1,
          kernel_initializer=tf.keras.initializers.Constant([[0.5]]),
          kernel_regularizer=tf.keras.regularizers.l2(0.01),
          use_bias=False,
      )
      plus_1 = tf.keras.layers.Dense(
          units=1,
          kernel_initializer=tf.keras.initializers.Constant([[1.0]]),
          bias_initializer=tf.keras.initializers.Constant([1.0]),
          trainable=False,
      )
      outp = plus_1(times_w(inp))
      model = tf.keras.Model(inp, outp)
  
      model.compile(
          tf.keras.optimizers.SGD(0.002),
          "mean_squared_error",
          run_eagerly=True,
      )
      return model
  
imports: import os
  import pickle
  import tempfile
  from unittest import mock
  from googleapiclient import discovery
  import tensorflow
  import tensorflow_datasets
  from tensorflow_cloud.tuner import cloud_fit_client
  from tensorflow_cloud.tuner import cloud_fit_utils
  from tensorflow_cloud.utils import google_api_client
label_desc: Use image node_id 3 for calling the CloudFitClientTest obj's underlying member method code with example usage: obj._model() and returns: model