code: def pdudata_contents(self, use_dict=None, as_class=dict):
          
          if _debug: PDUData._debug("pdudata_contents use_dict=%r as_class=%r", use_dict, as_class)
  
          # make/extend the dictionary of content
          if use_dict is None:
              use_dict = as_class()
  
          # add the data if it is not None
          v = self.pduData
          if v is not None:
              if isinstance(v, str):
                  v = btox(v)
              elif hasattr(v, 'dict_contents'):
                  v = v.dict_contents(as_class=as_class)
              use_dict.__setitem__('data', v)
  
          # return what we built/updated
          return use_dict
docs: Return the contents of an object as a dict.