code: def base64_b64decode(instr):
      '''
      Decode a base64-encoded string using the "modern" Python interface.
      '''
      decoded = base64.b64decode(salt.utils.stringutils.to_bytes(instr))
      try:
          return salt.utils.stringutils.to_unicode(
              decoded,
              encoding='utf8' if salt.utils.platform.is_windows() else None
          )
      except UnicodeDecodeError:
          return decodef base64_b64decode(instr):
      '''
      Decode a base64-encoded string using the "modern" Python interface.
      '''
      decoded = base64.b64decode(salt.utils.stringutils.to_bytes(instr))
      try:
          return salt.utils.stringutils.to_unicode(
              decoded,
              encoding='utf8' if salt.utils.platform.is_windows() else None
          )
      except UnicodeDecodeError:
          return decoded
docs: Decode a base64-encoded string using the "modern" Python interface.