code: def compute_all_embeddings(
      self, dataloader, trunk_model, embedder_model
  ):
      s, e = 0, 0
      with torch.no_grad():
          for i, data in enumerate(tqdm.tqdm(dataloader)):
              anchors, posnegs, label = self.data_and_label_getter(data)
              label = c_f.process_label(
                  label, self.label_hierarchy_level, self.label_mapper
              )
              a = self.get_embeddings_for_eval(
                  trunk_model, embedder_model, anchors
              )
              pns = self.get_embeddings_for_eval(
                  trunk_model, embedder_model, posnegs
              )
              if label.dim() == 1:
                  label = label.unsqueeze(1)
              if i == 0:
                  labels = torch.zeros(
                      len(dataloader.dataset), label.size(1)
                  )
                  all_anchors = torch.zeros(
                      len(dataloader.dataset), pns.size(1)
                  )
                  all_posnegs = torch.zeros(
                      len(dataloader.dataset), pns.size(1)
                  )
  
              e = s + pns.size(0)
              all_anchors[s:e] = a
              all_posnegs[s:e] = pns
              labels[s:e] = label
              s = e
      return all_anchors, all_posnegs, labels
  
file_path: pytorch-metric-learning/src/pytorch_metric_learning/testers/global_twostream_embedding_space.py
imports: import torch
  import tqdm
  from ..utils import common_functions
  from .global_embedding_space import GlobalEmbeddingSpaceTester
label_desc: Use image node_id 1 for calling the GlobalTwoStreamEmbeddingSpaceTester obj's underlying member method code with example usage: obj.compute_all_embeddings(dataloader, trunk_model, embedder_model) and returns: all_anchors,  all_posnegs,  labels