chrome/browser/resources/discards/generate_graph_tab.py
def strip_js_imports(js_contents):
  """The input JS may use imports for Closure compilation. These must be
  stripped from the output since the resulting data: URL cannot use imports
  within its webview."""
  def not_an_import(line):
    return not line.startswith('import ')
  return '\n'.join(filter(not_an_import, js_contents.splitlines()))
The input JS may use imports for Closure compilation. These must be
  stripped from the output since the resulting data: URL cannot use imports
  within its webview.
The input JS may use imports for Closure compilation. These must be
stripped from the output since the resulting data: URL cannot use imports
within its webview.
The input JS may use imports for Closure compilation . These must be stripped from the output since the resulting data : URL cannot use imports within its webview .
def strip_js_imports(js_contents):
  def not_an_import(line):
    return not line.startswith('import ')
  return '\n'.join(filter(not_an_import, js_contents.splitlines()))
def strip_js_imports ( js_contents ) : def not_an_import ( line ) : return not line . startswith ( 'import ' ) return '\n' . join ( filter ( not_an_import , js_contents . splitlines ( ) ) )
The input JS may use imports for Closure compilation.
The input JS may use imports for Closure compilation .
"""The input JS may use imports for Closure compilation. These must be
  stripped from the output since the resulting data: URL cannot use imports
  within its webview."""
js_contents