code: def get_facets_polyfills() -> str:
      """
      A JS polyfill/monkey-patching function that fixes issue where objectURL passed as a
      "base" argument to the URL constructor ends up in a "invalid URL" exception.
  
      Polymer is using parent's URL in its internal asset URL resolution system, while MLFLow
      artifact rendering engine uses object URLs to display iframed artifacts code. This ends up
      in object URL being used in `new URL()` constructor which needs to be patched.
  
      Original function code:
  
      (function patchURLConstructor() {
          const _originalURLConstructor = window.URL;
          window.URL = function (url, base) {
              if (typeof base === "string" && base.startsWith("blob:")) {
                  return new URL(base);
              }
              return new _originalURLConstructor(url, base);
          };
      })();
      """
      return '!function(){let t=window.URL;window.URL=function(n,e){return"string"==typeof e&&e.startsWith("blob:")?new URL(e):new t(n,e)}}();'
  
file_path: mlflow/mlflow/recipes/cards/pandas_renderer.py
imports: import base64
  import sys
  from typing import Iterable, Tuple, Union
  import numpy
  import pandas
  from packaging.version import Version
  from mlflow.exceptions import MlflowException
  from mlflow.protos import facet_feature_statistics_pb2
  from mlflow.recipes.cards import histogram_generator
label_desc: Use image node_id 7 for calling a global function with example usage: get_facets_polyfills() and returns: str