<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def envs(self, back=None, sources=False):
        '''
        Return the environments for the named backend or all backends
        '''
        back = self.backends(back)
        ret = set()
        if sources:
            ret = {}
        for fsb in back:
            fstr = '{0}.envs'.format(fsb)
            kwargs = {'ignore_cache': True} \
                if 'ignore_cache' in _argspec(self.servers[fstr]).args \
                and self.opts['__role'] == 'minion' \
                else {}
            if sources:
                ret[fsb] = self.servers[fstr](**kwargs)
            else:
                ret.update(self.servers[fstr](**kwargs))
        if sources:
            return ret
        return list(ret)