code: def __processJob(self, job, barsFreq, instruments, bars):
      bestResult = None
      parameters = job.getNextParameters()
      bestParams = parameters
      while parameters is not None:
          # Wrap the bars into a feed.
          feed = barfeed.OptimizerBarFeed(barsFreq, instruments, bars)
          # Run the strategy.
          self.getLogger().info(
              "Running strategy with parameters %s" % (str(parameters))
          )
          result = None
          try:
              result = self.runStrategy(feed, *parameters)
          except Exception as e:
              self.getLogger().exception(
                  "Error running strategy with parameters %s: %s"
                  % (str(parameters), e)
              )
          self.getLogger().info("Result %s" % result)
          if bestResult is None or result > bestResult:
              bestResult = result
              bestParams = parameters
          # Run with the next set of parameters.
          parameters = job.getNextParameters()
  
      assert bestParams is not None
      self.pushJobResults(job.getId(), bestResult, bestParams)
  
imports: import socket
  import multiprocessing
  import retrying
  from six.moves import xmlrpc_client
  import pyalgotrade.logger
  from pyalgotrade import barfeed
  from pyalgotrade.optimizer import serialization
label_desc: Use image node_id 7 for calling the Worker obj's underlying member method code with example usage: obj.__processJob(job, barsFreq, instruments, bars) without return types