code: def test_reverse_with_reshape(hspace):
      """Test that transformed grids can be reversed to original type, when reshape was applied"""
      flattened_space = flatten_space(hspace)
  
      grid = {
          "x": [0, 1, 2, 4],
          "y[0]": numpy.log([0.001, 0.01, 0.1, 1]),
          "y[1]": numpy.log([1, 0.01, 0.1, 0.001]),
          "z": [0, 0, 1, 2],
      }
  
      reversed_grid = reverse(flattened_space, grid)
      assert reversed_grid["x"] == [0, 1, 2, 4]
      assert reversed_grid["y[0]"] == [0.001, 0.01, 0.1, 1]
      assert reversed_grid["y[1]"] == [1, 0.01, 0.1, 0.001]
      assert reversed_grid["z"] == ["a", "a", "b", "c"]
  
imports: import copy
  import numpy
  import pandas
  import pytest
  from orion.analysis.partial_dependency_utils import make_grid, partial_dependency, partial_dependency_grid, reverse
  from orion.core.io.space_builder import SpaceBuilder
  from orion.core.utils import format_trials
  from orion.core.worker.transformer import build_required_space
label_desc: Use image node_id 7 for calling a global function with example usage: test_reverse_with_reshape(hspace) without return types