code: def dump_add_vspacing(buff, vspacing):
  	'Post-processing to add some nice-ish spacing for deeper map/list levels.'
  	if isinstance(vspacing, int):
  		vspacing = ['\n']*(vspacing+1)
  	buff.seek(0)
  	result = list()
  	for line in buff:
  		level = 0
  		line = line.decode('utf-8')
  		result.append(line)
  		if ':' in line or re.search(r'---(\s*$|\s)', line):
  			while line.startswith('  '):
  				level, line = level + 1, line[2:]
  			if len(vspacing) > level and len(result) != 1:
  				vspace = vspacing[level]
  				result.insert( -1, vspace
  					if not isinstance(vspace, int) else '\n'*vspace )
  	buff.seek(0), buff.truncate()
  	buff.write(''.join(result).encode('utf-8')f dump_add_vspacing(buff, vspacing):
  	'Post-processing to add some nice-ish spacing for deeper map/list levels.'
  	if isinstance(vspacing, int):
  		vspacing = ['\n']*(vspacing+1)
  	buff.seek(0)
  	result = list()
  	for line in buff:
  		level = 0
  		line = line.decode('utf-8')
  		result.append(line)
  		if ':' in line or re.search(r'---(\s*$|\s)', line):
  			while line.startswith('  '):
  				level, line = level + 1, line[2:]
  			if len(vspacing) > level and len(result) != 1:
  				vspace = vspacing[level]
  				result.insert( -1, vspace
  					if not isinstance(vspace, int) else '\n'*vspace )
  	buff.seek(0), buff.truncate()
  	buff.write(''.join(result).encode('utf-8'))
docs: Post-processing to add some nice-ish spacing for deeper map/list levels.