'Return a set of all check names associated with an identifier'

def get_check_names(self, identifier):

    check_names = set()
    if ((identifier not in self.kv_templates) and (identifier not in self.auto_conf_templates)):
        tpls = self.get_templates(identifier)
        if (not tpls):
            return check_names
        auto_conf = tpls[CONFIG_FROM_AUTOCONF]
        if auto_conf:
            check_names.update(auto_conf[0])
        kv_conf = tpls[CONFIG_FROM_TEMPLATE]
        if kv_conf:
            check_names.update(kv_conf[0])
    if ((identifier in self.kv_templates) and self.kv_templates[identifier]):
        check_names.update(set(self.kv_templates[identifier][0]))
    if ((identifier in self.auto_conf_templates) and self.auto_conf_templates[identifier]):
        check_names.update(set(self.auto_conf_templates[identifier][0]))
    return check_names
