code: def _bake_script(script):
      
      if "src" in script.attrs:
          if re.match("https?://", script["src"]):
              script_data = _load_url(script["src"]).read()
          else:
              script_data = _load_file(script["src"]).read()
          script.clear()
          if USING_PYTHON2:
              script.string = "\n" + script_data + "\n"
          else:
              script.string = "\n" + str(script_data) + "\n"
          del script["src"]
          del script["type"]
docs: Takes a script element and bakes it in only if it contains a remote resource