def METHOD_NAME(rule):
    namere = re.compile('name\s*:\s*(?:\'|")(.*)(?:\'|")')
    urlre = re.compile('^(\s*)url:\s*(.*),.*$')
    namelist = []
    for i, line in enumerate(rule):
        w = urlre.findall(line)
        if w:
            if 'name' in rule[i-1]:
                name = namere.findall(rule[i-1])[0]
                namelist.append(name)
            else:
                print(line)
    return namelist