code: def add_abbreviation(self, new_abbreviation):
          
          try:
              assert new_abbreviation not in self.get_abbreviations()
          except Exception as e:
              # TODO: raise a custom exception
              logger.warning("Duplicate abbreviation detected while adding \"%s\""%new_abbreviation)
              return False
  
          try:
              type_abbreviation = self.session.get_resource(BASE_URI_TYPES % "abbreviation"
                                                          , self.session.get_class(surf.ns.ECRM['E55_Type']))
              abbreviation = [abbreviation
                                  for name in self.ecrm_P1_is_identified_by
                                      for abbreviation in name.ecrm_P139_has_alternative_form
                                          if name.uri == surf.ns.EFRBROO['F12_Name']
                                              and abbreviation.ecrm_P2_has_type.first == type_abbreviation][0]
              abbreviation.rdfs_label.append(Literal(new_abbreviation))
              abbreviation.update()
              return True
          except IndexError as e:
              # means there is no abbreviation instance yet
              type_abbreviation = self.session.get_resource(BASE_URI_TYPES % "abbreviation"
                                                          , self.session.get_class(surf.ns.ECRM['E55_Type']))
              Appellation = self.session.get_class(surf.ns.ECRM['E41_Appellation'])
              abbreviation_uri = "%s/abbr" % str(self.subject)
              abbreviation = Appellation(abbreviation_uri)
              abbreviation.ecrm_P2_has_type = type_abbreviation
              abbreviation.rdfs_label.append(Literal(new_abbreviation))
              abbreviation.save()
  
              name = (name for name in self.ecrm_P1_is_identified_by if name.uri == surf.ns.EFRBROO['F12_Name']).next()
              name.ecrm_P139_has_alternative_form = abbreviation
              name.update()
              return True
          except Exception as e:
              raise e
docs: Adds a new name variant to an author.
  
          :param new_abbreviation: the abbreviation to be added
          :return: `True` if the abbreviation is added, `False` otherwise (the abbreviation is a duplicate)