import base64
import six


def UrlSafeB64Decode(message):
  """wrapper of base64.urlsafe_b64decode.

  Helper method to avoid calling six multiple times for preparing b64 strings.

  Args:
    message: string or binary to decode
  Returns:
    decoded data in string format.
  """
  data = base64.urlsafe_b64decode(six.ensure_binary(message))
  return six.ensure_str(data)