code: def _update_record_with_name(self, old_record, rtype, new_name, content):
          
          new_type = rtype if rtype else old_record['type']
  
          new_ttl = self._get_lexicon_option('ttl')
          if new_ttl is None and 'ttl' in old_record:
              new_ttl = old_record['ttl']
  
          new_priority = self._get_lexicon_option('priority')
          if new_priority is None and 'priority' in old_record:
              new_priority = old_record['priority']
  
          new_content = content
          if new_content is None and 'content' in old_record:
              new_content = old_record['content']
  
          record = self._create_request_record(None,
                                               new_type,
                                               new_name,
                                               new_content,
                                               new_ttl,
                                               new_priority)
  
          # This will be a different domain name, so no name collision should
          # happen. First create a new entry and when it succeeds, delete the old
          # one.
          self._request_add_dns_record(record)
          self._request_delete_dns_record_by_id(old_record['id'])
docs: Updates existing record and changes it's sub-domain name