code: def get_group(X: gf.base.AnyNDArray) -> gf.base.AnyNDArray:
      return np.where(
          (((0.2 < X) & (X < 0.4)) | ((0.7 < X) & (X < 0.8))), 0, 1
      )
  
file_path: GPflow/doc/sphinx/notebooks/advanced/varying_noise.pct.py
imports: import os
  import warnings
  from typing import Optional, Tuple
  import matplotlib.pyplot
  import numpy
  import tensorflow
  from check_shapes import inherit_check_shapes
  import gpflow
  from gpflow.ci_utils import reduce_in_tests
  from gpflow.utilities import print_summary
label_desc: Use image node_id 3 for calling a global function with example usage: get_group(X) and returns: np