def qualifying_prefix(modname, qualname):
    """
    Returns a new string that is used for the first half of the mangled name.
    """
    return '{}.{}'.format(modname, qualname) if modname else qualname
