docs: def check(self, defn, msg=None):
          """Uses the byte range in the object definition to determine
          the number of bytes and compares to the size defined in the type.
  
          Assumes the defn has 'type' and 'name' attributes, and a slice() method
          """
          if isinstance(defn.type, dtype.PrimitiveType):
              # Check the nbytes designated in the YAML match the PDT
              nbytes = defn.type.nbytes
              defnbytes = defn.slice().stop - defn.slice().start
              if nbytes != defnbytes:
                  self.messages.append(self.msg % defn.name)
                  self.messages.append("Definition size of (" + str(defnbytes) +
                                       " bytes) does not match size of data" +
                                       " type " +str(defn.type.name) + " (" +
                                       str(nbytes) + " byte(s))")
                  # TODO self.messages.append("TBD location message")
                  self.valid = False