code: def fspace(space):
      return build_required_space(
          space,
          dist_requirement="linear",
          type_requirement="numerical",
          shape_requirement="flattened",
      )
  
imports: import numpy
  import pandas
  import pytest
  from sklearn.ensemble import AdaBoostRegressor, BaggingRegressor, ExtraTreesRegressor, GradientBoostingRegressor, RandomForestRegressor
  from orion.analysis.base import average, flatten_numpy, flatten_params, ranking, to_numpy, train_regressor
  from orion.core.io.space_builder import SpaceBuilder
  from orion.core.worker.transformer import build_required_space
label_desc: Use image node_id 2 for calling a global function with example usage: fspace(space) and returns: build_required_space