code: 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)
      )  # pytype: disable=wrong-arg-types
      checksum = tf.compat.as_text(checksum)[:-1]
      name, extension = _sanitize_url(url, max_length=46)
      return "%s%s%s" % (name, checksum, extension)
  
imports: import base64
  import codecs
  import enum
  import hashlib
  import itertools
  import json
  import os
  import re
  from typing import Any, Optional
  from etils import epath
  from six.moves import urllib
  from tensorflow_datasets.core import utils
  from tensorflow_datasets.core.download import checksums
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
label_desc: Use image node_id 4 for calling a global function with example usage: get_dl_fname(url, checksum) and returns: unknown