code: def render(self, parts=None):
          
          if not parts:
              parts = self.parts
  
          fmt = []
          data = []
  
          for name, part_class in parts:
              if issubclass(part_class, Primitive):
                  part = part_class(getattr(self, name, None))
              else:
                  part = getattr(self, name, None)
  
              part_format, part_data = part.render()
  
              fmt.extend(part_format)
              data.extend(part_data)
  
          return "".join(fmt), data
docs: Returns a two-element tuple with the ``struct`` format and values.
  
          Iterates over the applicable sub-parts and calls `render()` on them,
          accumulating the format string and values.
  
          Optionally takes a subset of parts to render, default behavior is to
          render all sub-parts belonging to the class.