For sufficiently common motifs, len(find_motifs(...)) has an unnecessarily large memory footprint. If the user is just looking for a count rather than an enumeration of each monomorphism, we can increment a count rather than saving a copy of monomorphisms in a list.
For sufficiently common motifs,
len(find_motifs(...))
has an unnecessarily large memory footprint. If the user is just looking for a count rather than an enumeration of each monomorphism, we can increment a count rather than saving a copy of monomorphisms in a list.