code: def _get_matched_host_line_numbers(lines, enc):
      '''
      Helper function which parses ssh-keygen -F function output and yield line
      number of known_hosts entries with encryption key type matching enc,
      one by one.
      '''
      enc = enc if enc else "rsa"
      for i, line in enumerate(lines):
          if i % 2 == 0:
              line_no = int(line.strip().split()[-1])
              line_enc = lines[i + 1].strip().split()[-2]
              if line_enc != enc:
                  continue
              yield line_nf _get_matched_host_line_numbers(lines, enc):
      '''
      Helper function which parses ssh-keygen -F function output and yield line
      number of known_hosts entries with encryption key type matching enc,
      one by one.
      '''
      enc = enc if enc else "rsa"
      for i, line in enumerate(lines):
          if i % 2 == 0:
              line_no = int(line.strip().split()[-1])
              line_enc = lines[i + 1].strip().split()[-2]
              if line_enc != enc:
                  continue
              yield line_no
docs: Helper function which parses ssh-keygen -F function output and yield line
      number of known_hosts entries with encryption key type matching enc,
      one by one.