def setup_gpio(self, gpio_num, value="0\n", direction="out\n"):
        if type(value) is not str:
            self.logger.error("Param 'value' must be a string")
            raise ValueError("Param 'value' must be a string")
        if type(direction) is not str:
            self.logger.error("Param 'direction' must be a string")
            raise ValueError("Param 'direction' must be a string")
        if value[-1:] != "\n":
            self.logger.error("Param 'value' must be newline-terminated")
            raise ValueError("Param 'value' must be newline-terminated")
        if direction[-1:] != "\n":
            self.logger.error("Param 'direction' must be newline-terminated")
            raise ValueError("Param 'direction' must be newline-terminated")

        test_dir = self.config["test_gpio_base_dir"] + str(gpio_num)

        # Build test directories if they don't exist
        if not os.path.exists(test_dir):
            os.makedirs(test_dir)

        # Set known values in GPIO simulated hardware files
        with open(test_dir + "/value", "w") as f:
            f.write(value)
        with open(test_dir + "/direction", "w") as f:
            f.write(direction)
Construct ActionFactory
dataset/ETHPy150Open IEEERobotics/bot/tests/test_bot.py/TestBot.setup_gpio--crossover with--dataset/ETHPy150Open tuturto/pyherc/src/pyherc/rules/public.py/ActionFactory.__init__