'Annotate the primaryjoin and secondaryjoin
structures with \'remote\' annotations marking columns
considered as part of the \'remote\' side.'

def _annotate_remote(self):

    if self._has_remote_annotations:
        return
    if (self.secondary is not None):
        self._annotate_remote_secondary()
    elif (self._local_remote_pairs or self._remote_side):
        self._annotate_remote_from_args()
    elif self._refers_to_parent_table():
        self._annotate_selfref((lambda col: ('foreign' in col._annotations)))
    elif self._tables_overlap():
        self._annotate_remote_with_overlap()
    else:
        self._annotate_remote_distinct_selectables()
