def pop_order_at_loc(tpos, loc):
    """If there is an order at loc in tpos, remove and return it
    tpos: A list of (turn, power, order) tuples
    Returns: (power, order) if found, else (None, None)
    """
    for i, (_, power, order) in enumerate(tpos):
        order_loc = order.split()[1]
        if loc.split("/")[0] == order_loc.split("/")[0]:
            del tpos[i]
            return (power, order)
    return None, None