code: def to_str(data):
      
      if isinstance(data, bytes):
          return codecs.decode(data, aws_encryption_sdk.internal.defaults.ENCODING)
      return data
docs: Takes an input str or bytes object and returns an equivalent str object.
  
      :param data: Input data
      :type data: str or bytes
      :returns: Data normalized to str
      :rtype: str