code: def construct(generator, subtopic):
          '''Method constructor of Item-derived classes.
  
          Given a subtopic tuple, this method attempts to construct an
          Item-derived class, currently either ItemText or ItemImage, from the
          subtopic's type, found in its 4th element.
  
          :param generator: Reference to the owning ReportGenerator instance
          :param subtopic: Tuple containing content_id, meta_url, subtopic_id,
          type and type-specific data.
  
          :returns An instantiated Item-derived class.
  
          '''
          type = subtopic[3]
          if type not in Item.constructors:
              raise LookupError(type)   # perhaps customise this exception?
  
          return Item.constructors[type](generator, subtopicf construct(generator, subtopic):
          '''Method constructor of Item-derived classes.
  
          Given a subtopic tuple, this method attempts to construct an
          Item-derived class, currently either ItemText or ItemImage, from the
          subtopic's type, found in its 4th element.
  
          :param generator: Reference to the owning ReportGenerator instance
          :param subtopic: Tuple containing content_id, meta_url, subtopic_id,
          type and type-specific data.
  
          :returns An instantiated Item-derived class.
  
          '''
          type = subtopic[3]
          if type not in Item.constructors:
              raise LookupError(type)   # perhaps customise this exception?
  
          return Item.constructors[type](generator, subtopic)
docs: Method constructor of Item-derived classes.
  
          Given a subtopic tuple, this method attempts to construct an
          Item-derived class, currently either ItemText or ItemImage, from the
          subtopic's type, found in its 4th element.
  
          :param generator: Reference to the owning ReportGenerator instance
          :param subtopic: Tuple containing content_id, meta_url, subtopic_id,
          type and type-specific data.
  
          :returns An instantiated Item-derived class.