def run_command(self, should_decode=True):
        """
        Running the bash commands using the subprocess library
        """
        try:
            self.command_result, self.command_result_err = subprocess.Popen(self.command_to_run, shell=True,
                                                                            stdout=subprocess.PIPE,
                                                                            stderr=subprocess.STDOUT).communicate()
            if should_decode and PY3:
                self.command_result = self.command_result.decode('UTF-8').strip('\n')
        except Exception:
            self.command_result_err = "Error processing command"
        if "not found" in str(self.command_result):
            self.command_result_err = "Error running command: {}. Command does not exist. Please install it and run again.".format(
                self.command_to_run)

        Running the bash commands using the subprocess library
        
DataConnectors/Syslog/Sentinel_AMA_troubleshoot.py