input: Write a python function to generate Python classes from an OPC UA model and execute them in a new environment.
  assert isinstance(_generate_python_class([], {}), dict)
  assert 'ua' in _generate_python_class([], {})
output: def _generate_python_class(nodes, attributes):
      classes = {"ua": {}}
      for node in nodes:
          class_name = node['class_name']
          class_code = f"class {class_name}:\n"
          init_code = "    def __init__(self, **kwargs):\n"
          for attr in attributes.get(class_name, []):
              init_code += f"        self.{attr} = kwargs.get('{attr}', None)\n"
          class_code += init_code
          classes["ua"][class_name] = class_code
      return classes