Returns name of file for (url, checksum).

  The max length of linux and windows filenames is 255 chars.
  Windows however expects short paths (260 chars), so we limit the file name
  to an arbitrary 90 chars.

  Naming pattern: '${url}${checksum}'.
   - url: url sanitized and shortened to 46 chars.
   - checksum: base64url encoded sha256: 44 chars (removing trailing '=').

  Args:
    url: `str`, url of the file.
    checksum: `str` (hex), the sha256 hexdigest of file or url.

  Returns:
    string of 90 chars max.

def get_dl_fname(url, checksum):
  """Returns name of file for (url, checksum).

  The max length of linux and windows filenames is 255 chars.
  Windows however expects short paths (260 chars), so we limit the file name
  to an arbitrary 90 chars.

  Naming pattern: '${url}${checksum}'.
   - url: url sanitized and shortened to 46 chars.
   - checksum: base64url encoded sha256: 44 chars (removing trailing '=').

  Args:
    url: `str`, url of the file.
    checksum: `str` (hex), the sha256 hexdigest of file or url.

  Returns:
    string of 90 chars max.
  """
  checksum = base64.urlsafe_b64encode(_decode_hex(checksum))
  checksum = tf.compat.as_text(checksum)[:-1]
  name, extension = _sanitize_url(url, max_length=46)
  return '%s%s%s' % (name, checksum, extension)