def parse_parts(arg, spendables, payables, network):
    parts = arg.split('/')
    if (4 <= len(parts) <= 7):
        try:
            spendables.append(Spendable.from_text(arg))
            return True
        except Exception:
            pass
    if ((len(parts) == 2) and is_address_valid(parts[0], allowable_netcodes=[network])):
        try:
            payables.append(parts)
            return True
        except ValueError:
            pass
def parse_parts(arg, spendables, payables, network):
    parts = arg.split('/')
    if (4 <= len(parts) <= 7):
        try:
            spendables.append(Spendable.from_text(arg))
            return True
        except Exception:
            pass
    if ((len(parts) == 2) and is_address_valid(parts[0], allowable_netcodes=[network])):
        try:
            payables.append(parts)
            return True
        except ValueError:
            pass