def METHOD_NAME(self, reference, rule):
    shortened_ref = shorten_relevant_ref(reference.regex_with_groups, rule.relevant_refs[0])
    if not shortened_ref:
        shortened_ref = self.DEFAULT_SHORTENED_REF
    return shortened_ref