<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def cull(data,index,min=None,max=None):
 """Sieve an emcee clouds by excluding walkers with search variable 'index' smaller than 'min' or larger than 'max'."""


    ret = data

    if min is not None:
        ret = ret[ret[:,index] > min,:]

    if max is not None:
        ret = ret[ret[:,index] < max,:]
    
    return ret