docs: def inspect(lines):
      """Inspect SDFile list of string
  
      Returns:
          tuple: (data label list, number of records)
      """
      labels = set()
      count = 0
      exp = re.compile(r">.*?<([\w ]+)>")  # Space should be accepted
      valid = False
      for line in lines:
          if line.startswith("M  END\n"):
              valid = True
          elif line.startswith("$$$$"):
              count += 1
              valid = False
          else:
              result = exp.match(line)
              if result:
                  labels.add(result.group(1))
      if valid:
          count += 1
      return list(labels), count