def METHOD_NAME(self, newdata, format, item_size):
    """
    Packs a list of data objects at the current position with a
    specified format and data size.
    """
    if not isinstance(newdata, Iterable):
        newdata = [newdata]
    for i in range(len(newdata)):
        nd = newdata[i]
        if isinstance(nd, str):
            nd = nd.encode()
        self.data += struct.pack(format, nd)
        self.pos += item_size
        self.num_bytes += item_size