code: def create_objects_for_type(self, raw_objects, o_type):
          
  
          # Ex: the above code do for timeperiods:
          # timeperiods = []
          # for timeperiodcfg in objects['timeperiod']:
          #    t = Timeperiod(timeperiodcfg)
          #    timeperiods.append(t)
          # self.timeperiods = Timeperiods(timeperiods)
  
          types_creations = self.__class__.types_creations
          (cls, clss, prop, initial_index, _) = types_creations[o_type]
  
          # List to store the created objects
          lst = []
          try:
              logger.info("- creating '%s' objects", o_type)
              for obj_cfg in raw_objects[o_type]:
                  # We create the object
                  my_object = cls(obj_cfg)
                  # and append it to the list
                  lst.append(my_object)
              if not lst:
                  logger.info("  none.")
          except KeyError:
              logger.info("  no %s objects in the configuration", o_type)
  
          # Create the objects list and set it in our properties
          setattr(self, prop, clss(lst, initial_index))
docs: Generic function to create objects regarding the o_type
  
          This function create real Alignak objects from the raw data got from the configuration.
  
          :param raw_objects: Raw objects
          :type raw_objects: dict
          :param o_type: the object type we want to create
          :type o_type: object
          :return: None