def lr_mark(line, lmark, rmark):
  """ read a string segment from line, which is enclosed between l&rmark
   e.g. extract the contents in parenteses
  Args:
    line (str): text line
    lmark (str): left marker, e.g. '('
    rmark (str): right marker, e.g. ')'
  Return:
    str: text in between left and right markers
  """
  lidx = line.find(lmark)
  assert lidx != -1
  ridx = line.find(rmark)
  assert ridx != -1
  return line[lidx+1:ridx]