code: def SentenceRELoader(
      path,
      rel2id,
      tokenizer,
      batch_size,
      shuffle,
      num_workers=8,
      collate_fn=SentenceREDataset.collate_fn,
      **kwargs,
  ):
      dataset = SentenceREDataset(
          path=path, rel2id=rel2id, tokenizer=tokenizer, kwargs=kwargs
      )
      data_loader = data.DataLoader(
          dataset=dataset,
          batch_size=batch_size,
          shuffle=shuffle,
          pin_memory=True,
          num_workers=num_workers,
          collate_fn=collate_fn,
      )
      return data_loader
  
imports: import torch
  import torch.utils.data
  import os, random, json, logging
  import numpy
  import sklearn.metrics
label_desc: Use image node_id 1 for calling a global function with example usage: SentenceRELoader(path, rel2id, tokenizer, batch_size, shuffle, num_workers, collate_fn) and returns: data_loader