def METHOD_NAME(p: Dict, req: AlgoListRequest) -> Dict:
    res = {}
    t = p['type']
    opt = p.get('options', None)
    if t == 'boolean':
        res['renderType'] = 'toggle'
    elif opt is not None:
        res['renderType'] = 'dropdown'
        res_opt = []
        if t == 'integer':
            res['dataType'] = 'number'
        for o in opt:
            if o['key'] == '$fields':
                if req.fieldMetas and len(req.fieldMetas) > 0:
                    res_opt.extend([{
                        'key': meta.fid,
                        'text': meta.name if meta.name and len(meta.name) > 0 else meta.fid
                    } for meta in req.fieldMetas])
            else:
                res_opt.append(o)
        res['options'] = res_opt
    elif t == 'number' or t == 'integer':
        res['dataType'] = 'number'
        if p.keys().isdisjoint(['maximum', 'minimum', 'exclusiveMinimum', 'exclusiveMaximum']):
            res['renderType'] = 'text'
        else:
            res['renderType'] = 'slider'
            res['range'] = [
                p.get('minimum', p.get('exclusiveMinimum', -math.inf) + 1e-4),
                p.get('maximum', p.get('exclusiveMaximum', math.inf) - 1e-4)
            ]
            step = p.get('multipleOf')
            if step is not None:
                res['step'] = step
            else:
                res['step'] = 1e-4
    else:
        res['renderType'] = 'text'
        pass
    return res