code: def filename_to_url(filename, cache_dir=None):
      """
      Return the url and etag (which may be ``None``) stored for `filename`.
      Raise ``EnvironmentError`` if `filename` or its stored metadata do not exist.
      """
      if cache_dir is None:
          cache_dir = FARM_CACHE
  
      cache_path = cache_dir / filename
      if not os.path.exists(cache_path):
          raise EnvironmentError("file {} not found".format(cache_path))
  
      meta_path = cache_path + ".json"
      if not os.path.exists(meta_path):
          raise EnvironmentError("file {} not found".format(meta_path))
  
      with open(meta_path, encoding="utf-8") as meta_file:
          metadata = json.load(meta_file)
      url = metadata["url"]
      etag = metadata["etag"]
  
      return url, etag
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import json
  import logging
  import os
  import tempfile
  import tarfile
  import zipfile
  from functools import wraps
  from hashlib import sha256
  from io import open
  from pathlib import Path
  import boto3
  import numpy
  import requests
  from botocore.exceptions import ClientError
  from dotmap import DotMap
  from tqdm import tqdm
  from transformers.file_utils import cached_path
label_desc: Use image node_id 2 for calling a global function with example usage: filename_to_url(filename, cache_dir) and returns: url,  etag