code: def test_convert_to_numpy():
      """unit tests"""
      stats = dict()
      stats["key_1"] = torch.from_numpy(np.random.random(10))
      convert_to_numpy(stats=stats, cast=None, in_place=False)
      convert_to_numpy(stats=stats, cast=None, in_place=True)
      convert_to_numpy(stats=stats, cast=None, in_place="try")
      assert isinstance(stats["key_1"], np.ndarray)
  
file_path: maze/maze/test/perception/test_perception_utils.py
imports: import numpy
  import pytest
  import torch
  from gym import spaces
  from maze.perception.perception_utils import flatten_spaces, observation_spaces_to_in_shapes, map_nested_structure, convert_to_torch, convert_to_numpy, stack_and_flatten_spaces
label_desc: Use image node_id 7 for calling a global function with example usage: test_convert_to_numpy() without return types