import re


def isheading(line):
  """Tests if a heading."""
  front_cnt = re.search('^=+', line)
  back_cnt = re.search('^=+', line[::-1])
  if front_cnt and back_cnt and len(front_cnt.group(0)) == len(
      back_cnt.group(0)):
    return True