code: def ng_sample(self):
      self.is_sampling = True
  
      features_ps = self.features
      features_ng = []
      for x in features_ps:
          u = x[0]
          for t in range(self.num_ng):
              j = np.random.randint(self.num_item)
              while (u, j) in self.train_mat:
                  j = np.random.randint(self.num_item)
              features_ng.append([u, j])
      labels_ps = [1.0 for _ in range(len(features_ps))]
      labels_ng = [0.0 for _ in range(len(features_ng))]
      self.features = features_ps + features_ng
      self.labels = labels_ps + labels_ng
  
imports: import os
  import tempfile
  import numpy
  import pandas
  import scipy.sparse
  from sklearn.model_selection import train_test_split
  from sklearn.preprocessing import MinMaxScaler
  import torch.utils.data
  from bigdl.dllib.utils.file_utils import is_local_path
  from bigdl.orca.data.file import get_remote_dir_to_local, get_remote_file_to_local
label_desc: Use image node_id 2 for calling the NCFData obj's underlying member method code with example usage: obj.ng_sample() without return types