def is_dir(self, dir_name):

        """Check if a directory exists on device"""

        self.shell_command(dir_name % "ls -ld %s")

        line = self.stdout[0]

        if line[-26:] == " No such file or directory":
            return False
        elif line[0] == 'd':
            return True
        else:
            return False
dataset/ETHPy150Open jakev/dtf/src/dtf/adb.py/DtfAdb.is_dir/swapped operands of `%`