code: def test_switched_mean_function(N: int, D: int) -> None:
      """
      Test for the SwitchedMeanFunction.
      """
      X: AnyNDArray = np.hstack(
          [rng.randn(N, D), 1.0 * rng.randint(0, 2, N).reshape(-1, 1)]
      )
      zeros, ones = Constant(np.zeros(1)), Constant(np.ones(1))
      switched_mean = SwitchedMeanFunction([zeros, ones])
  
      np_list: AnyNDArray = np.array([0.0, 1.0])
      result_ref = (np_list[X[:, D].astype(default_int())]).reshape(
          -1, 1
      )
      result = switched_mean(X)
  
      assert_allclose(result, result_ref)
  
imports: from typing import Any, Sequence, Tuple, Type
  import numpy
  import pytest
  import tensorflow_probability
  from check_shapes import check_shapes
  from numpy.testing import assert_allclose
  import gpflow
  from gpflow.base import AnyNDArray, TensorType
  from gpflow.config import default_int
  from gpflow.functions import Additive, Constant, Linear, MeanFunction, Polynomial, Product, SwitchedMeanFunction, Zero
  from gpflow.inducing_variables import InducingPoints
label_desc: Use image node_id 11 for calling a global function with example usage: test_switched_mean_function(N, D) without return types