code: def weighted_dataloaders(self: Datasets, wgts, bs=64, **kwargs):
      "Create a weighted dataloader `WeightedDL` with `wgts` for the training set"
      xtra_kwargs = [{}] * (self.n_subsets - 1)
      return self.dataloaders(
          bs=bs,
          dl_type=WeightedDL,
          dl_kwargs=({"wgts": wgts}, *xtra_kwargs),
          **kwargs,
      )
  
file_path: fastai/fastai/callback/data.py
imports: from __future__ import annotations
  from ..basics import *
label_desc: Use image node_id 1 for calling a global function with example usage: weighted_dataloaders(wgts, bs) and returns: self