<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def stop(self, nodes=None):
 """Stop one or many nodes. :param nodes: Nodes to be stopped. :type nodes: ``list`` """

        if not self.is_connected():
            return None

        nodes = nodes or self.nodes
        result = []

        for node in nodes:
            if node.state == 'stopped':
                logging.warning('Node %s is already "stopped".', node.name)
                continue
            try:
                status = self.gce.ex_stop_node(node)
                if status:
                    result.append(node)
            except InvalidRequestError as err:
                raise ComputeEngineManagerException(err)

        return result