docstr: This method validates that all the parameters in param_names
  have the same value across all the module level configs.
docstr_tok: ["This","method","validates","that","all","the","parameters","in","param_names","have","the","same","value","across","all","the","module","level","configs","."]
code: def _validate_same_params(self, param_names: _List[str]):
      """
      This method validates that all the parameters in param_names
      have the same value across all the module level configs.
      """
      expected_values = None
      if self.global_config is not None:
          expected_values = {
              param_name: getattr(self.global_config, param_name)
              for param_name in param_names
          }
      for name, config in self.module_type_configs.items():
          if config is not None:
              expected_values = self._validate_expected_value(
                  expected_values, name, config, param_names
              )
      for name, config in self.module_name_configs.items():
          if config is not None:
              expected_values = self._validate_expected_value(
                  expected_values, name, config, param_names
              )
  
imports: from collections import OrderedDict
  from typing import IO
  from typing import Any
  from typing import Callable
  from typing import Dict
  from typing import List
  from typing import Optional
  from typing import Type
  from typing import Union
  import cattrs
  import torch
  import yaml
  from attr import Factory
  from attr import asdict
  from attr import define
label_desc: Use image node_id 8 for calling the OptimizationConfig obj's underlying member method code with example usage: obj._validate_same_params(param_names) without return types