code: def test_hierarchical_trial_to_tuple(
      hierarchical_space, hierarchical_trial, params_tuple
  ):
      """Check if hierarchical trial is correctly created from a sample/tuple."""
      data = trial_to_tuple(hierarchical_trial, hierarchical_space)
      assert data == params_tuple
  
file_path: orion/tests/unittests/core/test_utils_format.py
imports: import pytest
  from orion.core.utils.format_trials import dict_to_trial, trial_to_tuple, tuple_to_trial
  from orion.core.worker.trial import Trial
label_desc: Use image node_id 9 for calling a global function with example usage: test_hierarchical_trial_to_tuple(hierarchical_space, hierarchical_trial, params_tuple) without return types