def METHOD_NAME(tensor_type):
  py_typecheck.check_type(tensor_type, computation_types.TensorType)
  numpy_value = np.full(
      shape=tensor_type.shape.dims,
      fill_value=value,
      dtype=tensor_type.dtype.as_numpy_dtype,
  )
  return xla_client.ops.Constant(builder, numpy_value)