code: def check_config_mode(self, check_string=")#", pattern=""):
          
          log.debug("pattern: {0}".format(pattern))
          self.write_channel(self.RETURN)
          output = self.read_until_pattern(pattern=pattern)
          log.debug("check_config_mode: {0}".format(repr(output)))
          output = output.replace("(s1)", "")
          output = output.replace("(s2)", "")
          log.debug("check_config_mode: {0}".format(repr(output)))
          return check_string in output
docs: Checks if the device is in configuration mode or not.
  
          Arista, unfortunately, does this:
          loc1-core01(s1)#
  
          Can also be (s2)