def METHOD_NAME(self):
    if not self.cleaned_data.get('management_ip'):
        return
    try:
        ip = IPAddress.objects.get(
            address=self.cleaned_data['management_ip'],
        )
    except IPAddress.DoesNotExist:
        pass
    else:
        if ip.base_object and ip.base_object.pk != self.instance.pk:
            ip_obj = ip.base_object.last_descendant
            msg = _(
                'Management IP is already assigned to '
                '<a target="_blank" href="{}">{}</a>'
            ).format(
                ip_obj.get_absolute_url(), ip_obj
            )
            exc = ValidationError({'management_ip': mark_safe(msg)})
            self._update_errors(exc)