from typing import List


def _get_argument_lines_from_docstring(lines: List[str]) -> List[str]:
  """Return names and types of arguments read from a doc string.

  This function takes in a function's docstring and returns back
  the argument section (Args:), with one line per argument defined.
  Arguments can be multi-lines.

  Args:
    lines (list): a list of lines read from a function's docstring.

  Returns:
    A list of lines that contain argument definitions.
  """
  arg_lines = []

  try:
    arg_index = [x.strip() for x in lines].index('Args:')
  except ValueError:
    return arg_lines

  new_index = arg_index + 1
  spaces = lines[arg_index].index('A')
  while True:
    line = lines[new_index]

    if not line.strip():
      break

    if line.strip() in ('Returns:', 'Raises:'):
      break

    # Checking indentation, whether the argument line is continuing or
    # a new argument is being defined.
    space_count = len(line) - len(line.lstrip(' '))
    if space_count == spaces * 2:
      arg_lines.append(line.strip())
    else:
      arg_lines[-1] = '{0:s} {1:s}'.format(arg_lines[-1], line.strip())

    new_index += 1
    if new_index >= len(lines)-1:
      break

  return arg_lines