code: def thesis_info2marc(self, key, value):
      
      def _get_b_value(value):
          DEGREE_TYPES_MAP = {
              'bachelor': 'Bachelor',
              'diploma': 'Diploma',
              'habilitation': 'Habilitation',
              'laurea': 'Laurea',
              'master': 'Master',
              'other': 'Thesis',
              'phd': 'PhD',
          }
  
          degree_type = value.get('degree_type')
          if degree_type:
              return DEGREE_TYPES_MAP.get(degree_type)
  
      result_500 = self.get('500', [])
      result_502 = self.get('502', {})
  
      if value.get('defense_date'):
          result_500.append({
              'a': u'Presented on {}'.format(value.get('defense_date')),
          })
  
      result_502 = {
          'b': _get_b_value(value),
          'c': [el['name'] for el in force_list(value.get('institutions'))],
          'd': value.get('date'),
      }
  
      self['500'] = result_500
      return result_502
docs: Populate the ``502`` MARC field.
  
      Also populates the ``500`` MARC field through side effects.