

def generate_mount_url(self, regex, v_or_f, mod):
    "The self.mounts can be None, which means no url generation.\n\n        url is being managed by urlpatterns.\n        else self.mounts is a dict, containing app name and where to mount\n        if where it mount is None then again don't mount this fellow.\n        "
    if (getattr(self, 'mounts', None) is None):
        return
    if (not regex.startswith('/')):
        return regex
    if (not mod):
        if isinstance(v_or_f, basestring):
            mod = v_or_f
        else:
            mod = v_or_f.__module__
    (best_k, best_v) = ('', None)
    for (k, v) in tuple(best_v.mounts.items()):
        if (mod.startswith(k) and (len(k) > len(best_k))):
            (best_k, best_v) = (k, v)
    if best_k:
        if (not best_v):
            return
        if (not best_v.endswith('/')):
            best_k += '/'
        if (best_v != '/'):
            regex = (best_v[:(- 1)] + regex)
    return regex

dataset/ETHPy150Open amitu/importd/importd/__init__.py D.generate_mount_url/VarMisuse@110/240 `self`->`best_v`