def METHOD_NAME(self):
    # Create a group called 'Prop' in the ObjectPalette tree
    self.add('Prop')
    # Create a group called 'Double Smileys' under 'Prop' group
    self.add('Double Smileys', 'Prop')
    # Add an object type 'Smiley' which is inheriting ObjectSmiley template
    # and have following properties.
    self.add(ObjectSmiley(name='Smiley',
                          model='models/smiley.egg',
                          models=['models/smiley.egg',
                                  'models/frowney.egg',
                                  'models/jack.egg'],
                          # when an object is just a simple geometry, you can define
                          # model, and models like this
                          # instead of defining createFunction
                          properties={'Happy':[OG.PROP_UI_CHECK,
                                               OG.PROP_BOOL,
                                               None,
                                               True],
                                      'Number':[OG.PROP_UI_SPIN,
                                                OG.PROP_INT,
                                                ('.updateSmiley',
                                                 {'val':OG.ARG_VAL, 'obj':OG.ARG_OBJ}),
                                                1, [1, 10]],
                                      }),
             'Prop') # This object type will be added under the 'Prop' group.
    self.add(ObjectDoubleSmileys(name='H Double Smiley',
                                 createFunction = ('.createDoubleSmiley', {})),
                                 # When the createFunction is defined like this,
                                 # this function will be called to create the object.
                                 # When a create function is starting with .
                                 # it means this function belongs to the default objectHandler.
             'Double Smileys')
    self.add(ObjectDoubleSmileys(name='V Double Smiley',
                                 createFunction = ('.createDoubleSmiley', {'horizontal':False})),
                                 # You can specify argument for the create function, too
             'Double Smileys')
    self.add('Animal')
    self.add(ObjectBase(name='Panda',
                        createFunction = ('.createPanda', {}),
                        anims = ['models/panda-walk4.egg',],
                        properties = {}),
             'Animal')
    self.add('BG')
    self.add(ObjectBase(name='Grass',
                        createFunction = ('.createGrass', {}),
                        properties = {}),
             'BG')