code: def eye(
      num: int, value: tf.Tensor, dtype: Optional[tf.DType] = None
  ) -> tf.Tensor:
      if dtype is not None:
          value = tf.cast(value, dtype)
      return tf.linalg.diag(tf.fill([num], value))
  
file_path: GPflow/gpflow/utilities/ops.py
imports: import copy
  from typing import Any, Callable, List, Optional
  import tensorflow
  import tensorflow_probability
  from check_shapes import check_shapes
label_desc: Use image node_id 1 for calling a global function with example usage: eye(num, value, dtype) and returns: tf