Repo-side classes
Portage uses eclasses to share code among ebuilds. We should implement something similar for Portmod to enable code sharing among similar mods.
The main example I'm thinking of is for mods only available on NexusMods, they could inherit a NexusMod class that requires that a new variable, NEXUS_ID be defined, and then handles mod_nofetch using that value and the contents of SRC_URI.
Fortunately for us this is relatively simple, as we essentially just need to add a directory to the repository (I suggest pyclass, to parallel the eclass dir) that gets inserted into to sys.path at some point before pybuilds are loaded from that repo. This is probably best done when loading the repos, noting that it needs to be done in order of priority to ensure that the highest priority version of a module gets loaded first (allowing modules to be overridden by modules of the same name in higher priority repos).
Note that they should be appended to the path to prevent a subtly malicious repo from overriding existing modules.