code: def related_records2marc(self, key, value):
      
      if value.get('relation_freetext'):
          return {
              'i': value.get('relation_freetext'),
              'w': get_recid_from_ref(value.get('record')),
          }
      elif value.get('relation') == 'successor':
          self.setdefault('78502', []).append({
              'i': 'superseded by',
              'w': get_recid_from_ref(value.get('record')),
          })
      elif value.get('relation') == 'predecessor':
          self.setdefault('78002', []).append({
              'i': 'supersedes',
              'w': get_recid_from_ref(value.get('record')),
          })
      else:
          raise NotImplementedError(u"Unhandled relation in related_records: {}".format(value.get('relation')))
docs: Populate the ``78708`` MARC field
  
      Also populates the ``78002``, ``78502`` MARC fields through side effects.