code: def _to_dict(self):
          
          for i, tag in enumerate(self.tags):
              if tag in ("", None):
                  self.tags.pop(i)
  
          data = {
              'name': self.name,
              'referenceId': self.reference_id,
              'shortDescription': self.short_description,
              'longDescription': self.long_description,
              'itemState': self.item_state,
              'linkURL': self.link_url,
              'linkText': self.link_text,
              'tags': self.tags,
              'economics': self.economics,
              'id': self.id,
              'end_date': _make_tstamp(self.end_date),
              'start_date': _make_tstamp(self.start_date)}
          if len(self.renditions) > 0:
              data['renditions'] = []
              for r in self.renditions:
                  data['renditions'].append(r.to_dict())
          if len(self.metadata) > 0:
              data['customFields'] = {}
              for meta in self.metadata:
                  data['customFields'][meta['key']] = meta['value']
          [data.pop(key) for key in data.keys() if data[key] == None]
          return data
docs: Converts object into a dictionary.