code: def retrieve_instances(self, query=None):
          
          if query is None:
              data = javabridge.call(self.jobject, "retrieveInstances", "()Lweka/core/Instances;")
          else:
              data = javabridge.call(self.jobject, "retrieveInstances", "(Ljava/lang/String;)Lweka/core/Instances;")
          return Instances(data)
docs: Executes either the supplied query or the one set via options (or the 'query' property).
  
          :param query: query to execute if not the currently set one
          :type query: str
          :return: the generated dataq
          :rtype: Instances