code: def parse_device_list(device_list_str, key):
      
      clean_lines = new_str(device_list_str, 'utf-8').strip().split('\n')
      results = []
      for line in clean_lines:
          tokens = line.strip().split('\t')
          if len(tokens) == 2 and tokens[1] == key:
              results.append(tokens[0])
      return results
docs: Parses a byte string representing a list of devices.
  
      The string is generated by calling either adb or fastboot. The tokens in
      each string is tab-separated.
  
      Args:
          device_list_str: Output of adb or fastboot.
          key: The token that signifies a device in device_list_str.
  
      Returns:
          A list of android device serial numbers.