code: def execute(self, jvm_options=None, args=None, executor=None,
                workunit_factory=None, workunit_name=None, workunit_labels=None):
      
      # NB(gmalmquist): It should be OK that we can't declare a subsystem_dependency in this file
      # (because it's just a plain old object), because Ivy is only constructed by Bootstrapper, which
      # makes an explicit call to IvySubsystem.global_instance() in its constructor, which in turn has
      # a declared dependency on DistributionLocator.
      executor = executor or SubprocessExecutor(DistributionLocator.cached())
      runner = self.runner(jvm_options=jvm_options, args=args, executor=executor)
      try:
        with self.resolution_lock:
          result = util.execute_runner(runner, workunit_factory, workunit_name, workunit_labels)
        if result != 0:
          raise self.Error('Ivy command failed with exit code {}{}'.format(
                             result, ': ' + ' '.join(args) if args else ''))
      except executor.Error as e:
        raise self.Error('Problem executing ivy: {}'.format(e))
docs: Executes the ivy commandline client with the given args.
  
      Raises Ivy.Error if the command fails for any reason.
      :param executor: Java executor to run ivy with.