def __init__(self,
                 name,
                 crate_home,
                 crate_config=None,
                 port=4200,
                 keepRunning=False,
                 transport_port=None,
                 crate_exec=None,
                 cluster_name=None,
                 host="localhost",
                 multicast=False,
                 settings=None):
        """
        :param name: layer name, is also used as the cluser name
        :param crate_home: path to home directory of the crate installation
        :param port: port on which crate should run
        :param keepRunning: do not shut down the crate instance for every
                            single test instead just delete all indices
        :param transport_port: port on which transport layer for crate should
                               run
        :param crate_exec: alternative executable command
        :param crate_config: alternative crate config file location.
                             Must be a directory or a file named 'crate.yml'
        :param cluster_name: the name of the cluster to join/build. Will be
                             generated automatically if omitted.
        :param host: the host to bind to. defaults to 'localhost'
        :param settings: further settings that do not deserve a keyword
                         argument will be prefixed with ``es.``.
        """
        self.__name__ = name
        self.keepRunning = keepRunning
        crate_home = os.path.abspath(crate_home)
        if crate_exec is None:
            start_script = 'crate.bat' if sys.platform == 'win32' else 'crate'
            crate_exec = os.path.join(crate_home, 'bin', start_script)
        if crate_config is None:
            crate_config = os.path.join(crate_home, 'config', 'crate.yml')
        elif (os.path.isfile(crate_config) and
              os.path.basename(crate_config) != 'crate.yml'):
            raise ValueError(CRATE_CONFIG_ERROR)
        if cluster_name is None:
            cluster_name = "Testing{0}".format(port)
        settings = self.create_settings(crate_config,
                                        cluster_name,
                                        name,
                                        host,
                                        port,
                                        transport_port,
                                        multicast,
                                        settings)
        start_cmd = (crate_exec, ) + tuple(["-Des.%s=%s" % opt
                                           for opt in settings.items()])

        self.http_url = 'http://{host}:{port}'.format(
            host=settings['network.host'], port=settings['http.port'])

        self._wd = wd = os.path.join(CrateLayer.tmpdir, 'crate_layer', name)
        self.start_cmd = start_cmd + (wd % '-Des.path.data=%s',)
dataset/ETHPy150Open crate/crate-python/src/crate/testing/layer.py/CrateLayer.__init__/swapped operands of `%`