def _intersperse(interspersed, sections):
  """Intersperses `interspersed` between non-empty `sections`."""
  result = []
  for section in sections:
    if section:
      if result:
        result.extend(interspersed)
      result.extend(section)
  return result