code: def _validate_dimensions(transformed_args, exp_space):
      exp_namespaces = list(exp_space.keys())
      values = {}
  
      # Find any dimension that is not given by the user and make sure they have a default value
      for exp_n in exp_namespaces:
          if (
              exp_n not in transformed_args.keys()
              and exp_space[exp_n].default_value is None
          ):
              raise ValueError(
                  f"Dimension {exp_n} is unspecified and has no default value"
              )
  
      # Find any namespace that is not in the space of the experiment,
      # or values that lie outside the prior's interval
      for namespace, value in transformed_args.items():
          if namespace not in exp_space:
              raise ValueError(
                  f"Found namespace outside of experiment space : {namespace}"
              )
  
          valid, value = _validate_input_value(
              value, exp_space, namespace
          )
  
          if not valid:
              raise ValueError(
                  f"Value {value} is outside of dimension's prior interval"
              )
  
          values[namespace] = value
  
      return values
  
file_path: orion/src/orion/core/cli/insert.py
imports: import collections
  import logging
  import os
  import re
  from orion.core.cli import base
  from orion.core.io import experiment_builder
  from orion.core.io.convert import infer_converter_from_file_type
  from orion.core.utils.format_trials import tuple_to_trial
label_desc: Use image node_id 3 for calling a global function with example usage: _validate_dimensions(transformed_args, exp_space) and returns: values