def METHOD_NAME(
    raw_positions, account_id=arg_not_supplied
) -> positionsFromIB:
    """
    :param raw_positions: list of positions in form Position(...)
    :return: dict of positions as dataframes
    """
    resolved_positions_dict = dict()
    position_methods = dict(
        STK=resolve_ib_stock_position,
        FUT=resolve_ib_future_position,
        CASH=resolve_ib_cash_position,
    )
    for position in raw_positions:
        if account_id is not arg_not_supplied:
            if position.account != account_id:
                continue
        asset_class = position.contract.secType
        method = position_methods.get(asset_class, None)
        if method is None:
            # Resolve unexpected asset classes like cash rather than failing
            method = resolve_ib_cash_position
            # raise Exception("Can't find asset class %s in methods dict" % asset_class)
        resolved_position = method(position)
        asset_class_list = resolved_positions_dict.get(asset_class, [])
        asset_class_list.append(resolved_position)
        resolved_positions_dict[asset_class] = asset_class_list
    resolved_positions_dict = positionsFromIB(resolved_positions_dict)
    return resolved_positions_dict