from typing import List
import re
import yaml


def parse_multidicts(config: str) -> List[dict]:
    """Parse multiple YAML dictionaries from string, return list of them"""
    data = ""
    for line in config.split("\n"):
        if line.startswith("#") or re.fullmatch(r"^\s+$", line):
            print("IGNORE", line)
            continue
        elif re.match(r"^\S", line):
            data += "\n--- \n"
        data += line + "\n"
    res = list(yaml.safe_load_all(data))
    return res