@classmethod<EOL><INDENT>def get_links(cls, **kw):<DEDENT>
<EOL>startswith = kw.pop('<STR_LIT>', False)<EOL>kwitems = list(kw.items())  <EOL>constraint = set(kwitems)<EOL>models = []<EOL>for links in cls._linked_models.values():<EOL><INDENT>for lnk in links:<EOL><INDENT>if not constraint or constraint.issubset(set(lnk.items())):<EOL><INDENT>models.append(lnk)<EOL><DEDENT>elif startswith and lnk[kwitems[<NUM_LIT:0>][<NUM_LIT:0>]].startswith(kwitems[<NUM_LIT:0>][<NUM_LIT:1>]):<EOL><INDENT>models.append(lnk)<EOL><DEDENT><DEDENT><DEDENT>return models<EOL>
Linked models from this model

Keyword Args:
    filter by items of _linked_models

    startswith: Bool, use startswith for filtering instead of exact matching.
        Only works for filtering over one field.

Returns:
    Link list