code: def update_or_create(cls, name, engine, translation_values=None, with_status=False):
          
          updated, created = False, False
          alias = cls.get(name, raise_exc=False)
          if not alias:
              alias = cls.create(name)
              created = True
          
          elements = element_resolver(translation_values) if translation_values \
              else []
          
          if not created: # possible update
              # Does alias already exist with a value
              alias_value = [_alias
                  for _alias in engine.data.get('alias_value', [])
                  if _alias.get('alias_ref') == alias.href]
              
              if alias_value:
                  if not elements:
                      alias_value[0].update(translated_element=None)
                      updated = True
                  else:
                      t_values = alias_value[0].get('translated_element')
                      if set(t_values) ^ set(elements):
                          t_values[:] = elements
                          updated = True
          
          if elements and (created or not updated):
              engine.data.setdefault('alias_value', []).append(
                  {'alias_ref': alias.href,
                   'translated_element': elements})
              updated = True
           
          if updated:
              engine.update()
  
          if with_status:
              return alias, updated, created
          return alias
docs: Update or create an Alias and it's mappings.
          
          :param str name: name of alias
          :param Engine engine: engine to modify alias translation values
          :param list(str,Element) translation_values: translation values
              as elements. Can be None if you want to unset any existing values
          :param bool with_status: if set to True, a 3-tuple is returned with
              (Element, modified, created), where the second and third tuple
              items are booleans indicating the status
          :raises ElementNotFound: specified engine or translation values are not
              found in the SMC
          :raises UpdateElementFailed: update failed with reason
          :raises CreateElementFailed: create failed with reason
          :rtype: Element