parameters: (
              self, instantiated_class: instantiator.InstantiatedClass)
return_statement: return ('{class_declaration}'
                  '{wrapped_ctors}'
                  '{wrapped_methods}'
                  '{wrapped_static_methods}'
                  '{wrapped_properties}'
                  '{wrapped_operators};\n'.format(
                      class_declaration=class_declaration,
                      wrapped_ctors=self.wrap_ctors(instantiated_class),
                      wrapped_methods=self.wrap_methods(
                          instantiated_class.methods, cpp_class),
                      wrapped_static_methods=self.wrap_methods(
                          instantiated_class.static_methods, cpp_class),
                      wrapped_properties=self.wrap_properties(
                          instantiated_class.properties, cpp_class),
                      wrapped_operators=self.wrap_operators(
                          instantiated_class.operators, cpp_class)))
docstring: Wrap the class.
docstring_summary: Wrap the class.
docstring_tokens: Wrap the class .
function: def wrap_instantiated_class(
              self, instantiated_class: instantiator.InstantiatedClass):
          """Wrap the class."""
          module_var = self._gen_module_var(instantiated_class.namespaces())
          cpp_class = instantiated_class.to_cpp()
          if cpp_class in self.ignore_classes:
              return ""
          if instantiated_class.parent_class:
              class_parent = "{instantiated_class.parent_class}, ".format(
                  instantiated_class=instantiated_class)
          else:
              class_parent = ''
  
          if instantiated_class.enums:
              # If class has enums, define an instance and set module_var to the instance
              instance_name = instantiated_class.name.lower()
              class_declaration = (
                  '\n    py::class_<{cpp_class}, {class_parent}'
                  '{shared_ptr_type}::shared_ptr<{cpp_class}>> '
                  '{instance_name}({module_var}, "{class_name}");'
                  '\n    {instance_name}').format(
                      shared_ptr_type=('boost' if self.use_boost else 'std'),
                      cpp_class=cpp_class,
                      class_name=instantiated_class.name,
                      class_parent=class_parent,
                      instance_name=instance_name,
                      module_var=module_var)
              module_var = instance_name
  
          else:
              class_declaration = (
                  '\n    py::class_<{cpp_class}, {class_parent}'
                  '{shared_ptr_type}::shared_ptr<{cpp_class}>>({module_var}, "{class_name}")'
              ).format(shared_ptr_type=('boost' if self.use_boost else 'std'),
                       cpp_class=cpp_class,
                       class_name=instantiated_class.name,
                       class_parent=class_parent,
                       module_var=module_var)
  
          return ('{class_declaration}'
                  '{wrapped_ctors}'
                  '{wrapped_methods}'
                  '{wrapped_static_methods}'
                  '{wrapped_properties}'
                  '{wrapped_operators};\n'.format(
                      class_declaration=class_declaration,
                      wrapped_ctors=self.wrap_ctors(instantiated_class),
                      wrapped_methods=self.wrap_methods(
                          instantiated_class.methods, cpp_class),
                      wrapped_static_methods=self.wrap_methods(
                          instantiated_class.static_methods, cpp_class),
                      wrapped_properties=self.wrap_properties(
                          instantiated_class.properties, cpp_class),
                      wrapped_operators=self.wrap_operators(
                          instantiated_class.operators, cpp_class)))
function_tokens: def wrap_instantiated_class ( self , instantiated_class : instantiator . InstantiatedClass ) : module_var = self . _gen_module_var ( instantiated_class . namespaces ( ) ) cpp_class = instantiated_class . to_cpp ( ) if cpp_class in self . ignore_classes : return "" if instantiated_class . parent_class : class_parent = "{instantiated_class.parent_class}, " . format ( instantiated_class = instantiated_class ) else : class_parent = '' if instantiated_class . enums : # If class has enums, define an instance and set module_var to the instance instance_name = instantiated_class . name . lower ( ) class_declaration = ( '\n    py::class_<{cpp_class}, {class_parent}' '{shared_ptr_type}::shared_ptr<{cpp_class}>> ' '{instance_name}({module_var}, "{class_name}");' '\n    {instance_name}' ) . format ( shared_ptr_type = ( 'boost' if self . use_boost else 'std' ) , cpp_class = cpp_class , class_name = instantiated_class . name , class_parent = class_parent , instance_name = instance_name , module_var = module_var ) module_var = instance_name else : class_declaration = ( '\n    py::class_<{cpp_class}, {class_parent}' '{shared_ptr_type}::shared_ptr<{cpp_class}>>({module_var}, "{class_name}")' ) . format ( shared_ptr_type = ( 'boost' if self . use_boost else 'std' ) , cpp_class = cpp_class , class_name = instantiated_class . name , class_parent = class_parent , module_var = module_var ) return ( '{class_declaration}' '{wrapped_ctors}' '{wrapped_methods}' '{wrapped_static_methods}' '{wrapped_properties}' '{wrapped_operators};\n' . format ( class_declaration = class_declaration , wrapped_ctors = self . wrap_ctors ( instantiated_class ) , wrapped_methods = self . wrap_methods ( instantiated_class . methods , cpp_class ) , wrapped_static_methods = self . wrap_methods ( instantiated_class . static_methods , cpp_class ) , wrapped_properties = self . wrap_properties ( instantiated_class . properties , cpp_class ) , wrapped_operators = self . wrap_operators ( instantiated_class . operators , cpp_class ) ) )