def node_set_provision_state(self,
                                 name_or_id,
                                 state,
                                 configdrive=None,
                                 wait=False,
                                 timeout=3600):
        with _utils.shade_exceptions(
            "Baremetal machine node failed change provision state to "
            "{state}".format(state=state)
        ):
            machine = self.manager.submitTask(
                _tasks.MachineSetProvision(node_uuid=name_or_id,
                                           state=state,
                                           configdrive=configdrive))

            if wait:
                for count in _utils._iterate_timeout(
                        timeout,
                        "Timeout waiting for node transition to "
                        "target state of '%s'" % state):
                    machine = self.get_machine(name_or_id)
                    # NOTE(TheJulia): This performs matching if the requested
                    # end state matches the state the node has reached.
                    if state in machine['provision_state']:
                        break
                    # NOTE(TheJulia): This performs matching for cases where
                    # the reqeusted state action ends in available state.
                    if ("available" in machine['provision_state'] and
                            state in ["provide", "deleted"]):
                        break
            else:
                machine = self.get_machine(name_or_id)
            return machine
Return a function object suitable for the "get" side of the property
dataset/ETHPy150Open openstack-infra/shade/shade/operatorcloud.py/OperatorCloud.node_set_provision_state--crossover with--dataset/ETHPy150Open python-openxml/python-docx/docx/oxml/xmlchemy.py/ZeroOrOneChoice._choice_getter