code: def test_mean_functions_output_shape(
      mean_function_1: MeanFunction,
      mean_function_2: MeanFunction,
      operation: str,
  ) -> None:
      """
      Test the output shape for basic and compositional mean functions, also
      check that the combination of mean functions returns the correct class
      """
      X = np.random.randn(Datum.N, Datum.input_dim)
      Y = mean_function_1(X)
      # basic output shape check
      assert Y.shape in [(Datum.N, Datum.output_dim), (Datum.N, 1)]
  
      # composed mean function output shape check
      if operation == "+":
          mean_composed = mean_function_1 + mean_function_2
      elif operation == "*":
          mean_composed = mean_function_1 * mean_function_2
      else:
          raise NotImplementedError
  
      Y_composed = mean_composed(X)
      assert Y_composed.shape in [
          (Datum.N, Datum.output_dim),
          (Datum.N, 1),
      ]
  
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 1 for calling a global function with example usage: test_mean_functions_output_shape(mean_function_1, mean_function_2, operation) without return types