def METHOD_NAME(
    handle_error: Optional[Callable] = None, file_path: Optional[str] = None
):
    """
        This function will start a docker container running a node server listening on port 6161.
        The container will erase itself after exit.
        If there's a running server already with the same name it will be removed before starting a new one.
    Args:
        handle_error: handle_error function
        file_path: path of the content item
    Returns:
        A context manager
    """
    logger.info("Starting docker mdx server")
    get_docker().pull_image(MDX_SERVER_DOCKER_IMAGE)
    iteration_num = 1
    while mdx_container := init_global_docker_client().containers.list(
        filters={"name": DEMISTO_DEPS_DOCKER_NAME}
    ):
        logger.info(f"Found the following container(s): {mdx_container}")
        logger.info(f"{iteration_num=} when trying to remove {mdx_container}")
        remove_container(mdx_container[0])
        iteration_num += 1
    try:
        container: docker.models.containers.Container = get_docker().create_container(
            name=DEMISTO_DEPS_DOCKER_NAME,
            image=MDX_SERVER_DOCKER_IMAGE,
            auto_remove=True,
            ports={"6161/tcp": 6161},
        )
    except Exception as error:
        logger.info(
            f"Error occurred when trying to create {DEMISTO_DEPS_DOCKER_NAME} container, {error=}"
        )
        logger.info(
            f"all available containers: {[container.name for container in init_global_docker_client().containers.list(all=True)]}"
        )
        raise error
    container.start()
    try:
        line = str(next(container.logs(stream=True)).decode("utf-8"))
        raised_successfully = EXPECTED_SUCCESS_MESSAGE in line
    except docker.errors.NotFound:
        raised_successfully = False
        line = "Docker crashed on startup. To inspect, run the container in the same manner without the --rm flag."
    if not raised_successfully:
        try:
            remove_container(container)
            logger.error("Docker for MDX server was not started correctly")
            logger.error(f'docker logs:\n{container.logs().decode("utf-8")}')
        except docker.errors.NotFound:
            logger.exception(line)
        error_message = Errors.error_starting_docker_mdx_server(line=line)
        if handle_error and file_path:
            if handle_error(error_message, file_path=file_path):
                return False
        else:
            raise Exception(error_message)
    else:
        logger.info("Successfully started node server in docker")
    try:
        yield True
    finally:
        remove_container(container)