code: def decode_string(data, encoding='hex'):
      '''
      Decode string
  
      :param data: string to decode
      :param encoding: encoding to use (default: 'hex')
      :return: decoded string
      '''
      if six.PY2:
          return data.decode(encoding)
      else:
          return codecs.decode(data.encode('ascii'), encodingf decode_string(data, encoding='hex'):
      '''
      Decode string
  
      :param data: string to decode
      :param encoding: encoding to use (default: 'hex')
      :return: decoded string
      '''
      if six.PY2:
          return data.decode(encoding)
      else:
          return codecs.decode(data.encode('ascii'), encoding)
docs: Decode string
  
      :param data: string to decode
      :param encoding: encoding to use (default: 'hex')
      :return: decoded string