def METHOD_NAME(self, *, link_type: LinkType, lhs_node: Any, rhs_node: Any):
    assert lhs_node != rhs_node, (lhs_node, rhs_node)
    assert lhs_node.mid != rhs_node.mid, (lhs_node, rhs_node)
    assert not isinstance(lhs_node, MID)
    assert not isinstance(rhs_node, MID)
    assert isinstance(lhs_node.mid, MID)
    assert isinstance(rhs_node.mid, MID)
    self._map_mid_to_node[lhs_node.mid] = lhs_node
    self._map_mid_to_node[rhs_node.mid] = rhs_node
    links = self._links[link_type]
    if lhs_node.mid in links:
        assert rhs_node.mid not in links[lhs_node.mid]
    reverse_links = self._links_reverse[link_type]
    if lhs_node.mid not in links:
        links[lhs_node.mid] = OrderedSet([rhs_node.mid])
    else:
        links[lhs_node.mid].add(rhs_node.mid)
    if rhs_node.mid not in reverse_links:
        reverse_links[rhs_node.mid] = OrderedSet([lhs_node.mid])
    else:
        reverse_links[rhs_node.mid].add(lhs_node.mid)