def parse(self, text):
        args = text.split()

        if len(args) == 0:
            # we'll allow blank messages to propagate further in case some
            # other handler cares about them.
            return None

        action_keyword = args[0]
        args = args[1:]
        if not self.location:
            if len(args) == 0:
                # todo: this will change when users are tied to locations
                # though need to make sure that PACK and APPROVE still require location code
                # (since they refer to locations different from the sender's loc)
                raise SMSError("must specify a location code")
            self.case, self.location = self.get_supply_point_and_location(args[0])
            args = args[1:]

        action = self.C.action_by_keyword(action_keyword)
        if action and action.type == 'stock':
            # TODO: support single-action by product, as well as by action?
            self.verify_location_registration()
            self.case_id = self.case.case_id
            _tx = self.single_action_transactions(action, args)
        elif action and action.action in [
            RequisitionActions.REQUEST,
            RequisitionActions.FULFILL,
            RequisitionActions.RECEIPTS
        ]:
            # dropped support for this
            raise SMSError(_(
                "You can no longer use requisitions! Please contact your project supervisor for help"
            ))

        elif self.C.multiaction_enabled and action_keyword == self.C.multiaction_keyword:
            # multiple action stock report
            _tx = self.multiple_action_transactions(args)
        else:
            # initial keyword not recognized; delegate to another handler
            return None

        return self.unpack_transactions(_tx)
take in a text and return the parsed stock transactions
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/commtrack/sms.py/StockReportParser.parse