def _find_lines_after_prefix(text, prefix, num_lines):
  """Searches |text| for a line which starts with |prefix|.

  Args:
    text: String to search in.
    prefix: Prefix to search for.
    num_lines: Number of lines, starting with line with prefix, to return.
  Returns:
    Matched lines. Returns None otherwise.
  """
  lines = text.split('\n')
  for i, line in enumerate(lines):
    if line.startswith(prefix):
      return lines[i:i + num_lines]
  return None