'Get values from `tabSingles` (Single DocTypes) (internal).
:param fields: List of fields,
:param filters: Filters (dict).
:param doctype: DocType name.'

def get_values_from_single(self, fields, filters, doctype, as_dict=False, debug=False, update=None):

    if ((fields == u'*') or isinstance(filters, dict)):
        values = self.get_singles_dict(doctype)
        if isinstance(filters, dict):
            for (key, value) in filters.items():
                if (values.get(key) != value):
                    return []
        if as_dict:
            return ((values and [values]) or [])
        if isinstance(fields, list):
            return [map((lambda d: values.get(d)), fields)]
    else:
        r = self.sql((u'select    field,    value\n DCTB  DCTB  DCTB  DCTB from    tabSingles    where    field    in    (%s)    and    doctype=%s' % (u',    '.join(([u'%s'] * len(fields))), u'%s')), (tuple(fields) + (doctype,)), as_dict=False, debug=debug)
        if as_dict:
            if r:
                r = frappe._dict(r)
                if update:
                    r.update(update)
                return [r]
            else:
                return []
        else:
            return ((r and [[i[1] for i in r]]) or [])
