code: def test_map_nested_structure_inmutable():
      test_value = tuple(torch.rand((2, 4)))
      with pytest.raises(Exception) as e_info:
          map_nested_structure(
              test_value, mapping=lambda x: x * 2, in_place=True
          )
  
      test_value = list(torch.rand((2, 4)))
      out_value = map_nested_structure(
          test_value, mapping=lambda x: x * 2, in_place=True
      )
      assert test_value is out_value
  
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 4 for calling a global function with example usage: test_map_nested_structure_inmutable() without return types