code: def update_file(finfo, sample_info, config):
      
      if GalaxyInstance is None:
          raise ImportError("Could not import bioblend.galaxy")
      if "dir" not in config:
          raise ValueError("Galaxy upload requires `dir` parameter in config specifying the "
                           "shared filesystem path to move files to.")
      if "outputs" in config:
          _galaxy_tool_copy(finfo, config["outputs"])
      else:
          _galaxy_library_upload(finfo, sample_info, config)
docs: Update file in Galaxy data libraries.