def get_labels(label_filename):
  """ Get the label of a given set
      
  The labels are read from a text file, and a dictionary
  is built. The key is the file stem and the value is 
  the label (either 0 for an attack or 1 for banafide access).

  Parameters
  ----------
  label_filename: str
    The path to the file containing the labels

  Returns
  -------
  dict:
    the dictionary with file as key and label as value
  
  """
  dict_labels = {}
  with open(label_filename) as l:
    for line in l:
      temp = line.split(' ')[0]
      label = line.split(' ')[-1].rstrip()
      stem = temp.split('-')[0]
      dict_labels[stem] = label
  return dict_labels