code: def create_scalar_summary(name, v):
      
      assert isinstance(name, six.string_types), type(name)
      v = float(v)
      s = tf.Summary()
      s.value.add(tag=name, simple_value=v)
      return s
docs: Args:
          name (str):
          v (float): scalar value
      Returns:
          tf.Summary: a tf.Summary object with name and simple scalar value v.