code: def test_rollaxis(rolls: int, direction: str) -> None:
      A = np.random.randn(10, 5, 3)
      A_tf = tf.convert_to_tensor(A)
  
      if direction == "left":
          perm = [1, 2, 0] if rolls == 1 else [2, 0, 1]
      elif direction == "right":
          perm = [2, 0, 1] if rolls == 1 else [1, 2, 0]
      else:
          raise NotImplementedError
  
      A_rolled_ref = np.transpose(A, perm)
  
      if direction == "left":
          A_rolled_tf = rollaxis_left(A_tf, rolls)
      elif direction == "right":
          A_rolled_tf = rollaxis_right(A_tf, rolls)
      else:
          raise NotImplementedError
  
      assert_allclose(A_rolled_ref, A_rolled_tf)
  
file_path: GPflow/tests/gpflow/conditionals/test_util.py
imports: from typing import Optional, Tuple
  import numpy
  import pytest
  import tensorflow
  from _pytest.logging import LogCaptureFixture
  from numpy.testing import assert_allclose, assert_equal
  from gpflow import default_float
  from gpflow.conditionals.util import rollaxis_left, rollaxis_right, sample_mvn
  from gpflow.utilities.ops import leading_transpose
label_desc: Use image node_id 4 for calling a global function with example usage: test_rollaxis(rolls, direction) without return types