def METHOD_NAME(clock, logger, cache, msgbus, account_state):
    METHOD_NAME = Portfolio(
        msgbus,
        cache,
        clock,
        logger,
    )
    if account_state is not None:
        METHOD_NAME.update_account(account_state)
    return METHOD_NAME