def part_container
import near-architecture@0.9.1.0/arc.bend as Arcimport Base
583# The container a link end belongs to: a part's container, else the key itself.
584def part_container(ps: List<&2, Part>, +k: String) -> String:
585 match ps:
586 case []:
587 k
588 case +p <> rest:
589 pick_str(str_eq(k, pkey(p)), pin(p), part_container(rest, k))