def METHOD_NAME(s, default_store=Schema.CHARM_HUB):
    """parse parses the provided charm URL string into its respective
        structure.
        A missing schema is assumed to be 'ch'.
    """
    u = urlparse(s)
    if u.query != "" or u.fragment != "" or u.username or u.password:
        raise JujuError("charm or bundle URL {} has unrecognized parts".format(u))
    if Schema.LOCAL.matches(u.scheme):
        c = URL(Schema.LOCAL, name=u.path)
    elif Schema.CHARM_STORE.matches(u.scheme) or \
            (u.scheme == "" and Schema.CHARM_STORE.matches(default_store)):
        c = parse_v1_url(Schema.CHARM_STORE, u, s)
    else:
        c = parse_v2_url(u, s)
    if not c or not c.schema:
        raise JujuError("expected schema for charm or bundle URL {}".format(u))
    return c