code: def flatten_space(some_space):
      """Flatten a space"""
      return build_required_space(
          some_space,
          dist_requirement="linear",
          type_requirement="numerical",
          shape_requirement="flattened",
      )
  
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 3 for calling a global function with example usage: flatten_space(some_space) and returns: build_required_space