code: def affine(x, kernel_diag, bias=None):
      """`kernel_diag * x + bias` with broadcasting."""
      if bias is None:
          bias = tf.zeros([], dtype=x.dtype)
      return x * kernel_diag + bias
  
imports: import functools
  import tensorflow.compat.v2
  import tensorflow_probability
  from tensorflow_probability.python.internal import dtype_util
  from inference_gym.internal import data
  from inference_gym.targets import bayesian_model
  from inference_gym.targets import model
  from inference_gym.targets.ground_truth import radon_contextual_effects_indiana
  from inference_gym.targets.ground_truth import radon_contextual_effects_indiana_halfnormal
  from inference_gym.targets.ground_truth import radon_contextual_effects_minnesota
  from inference_gym.targets.ground_truth import radon_contextual_effects_minnesota_halfnormal
label_desc: Use image node_id 1 for calling a global function with example usage: affine(x, kernel_diag, bias) and returns: unknown