'check if value exists at path'

def exists(self, path, value):

    try:
        entry = Yedit.get_entry(self.yaml_dict, path, self.separator)
    except KeyError:
        entry = None
    if isinstance(entry, list):
        if (value in entry):
            return True
        return False
    elif isinstance(entry, dict):
        if isinstance(value, dict):
            rval = False
            for (key, val) in value.items():
                if (entry[key] != val):
                    rval = False
                    break
            else:
                rval = True
            return rval
        return (value in entry)
    return (entry == value)
