human
I am working on the file "PyWCPS.ipynb".
The first task is:
Finally, we can write this crime of a query:
for a in (CCI_V2_monthly_chlor_a) return encode (switch case 0.05 &gt.
a[Lat(30:70),Long(-30:10),ansi("2009-09-30T23:59:00Z")] return {red: 255.
green: 255.
blue: 255.
alpha: 0} case 0.1 &gt.
a[Lat(30:70),Long(-30:10),ansi("2009-09-30T23:59:00Z")]  return {red: 0.
green: 255.
blue: 255.
alpha: 255} case 0.2 &gt.
a[Lat(30:70),Long(-30:10),ansi("2009-09-30T23:59:00Z")]  return {red: 0.
green: 128.
blue: 255.
alpha: 255} case 0.5 &gt.
a[Lat(30:70),Long(-30:10),ansi("2009-09-30T23:59:00Z")]  return {red: 0.
green: 0.
blue: 255.
alpha: 255} case 1.5 &gt.
a[Lat(30:70),Long(-30:10),ansi("2009-09-30T23:59:00Z")]  return {red: 218.
green: 0.
blue: 255.
alpha: 255} case 3.0 &gt.
a[Lat(30:70),Long(-30:10),ansi("2009-09-30T23:59:00Z")]  return {red: 255.
green: 0.
blue: 255.
alpha: 255} case 4.5 &gt.
a[Lat(30:70),Long(-30:10),ansi("2009-09-30T23:59:00Z")]  return {red: 255.
green: 164.
blue: 0.
alpha: 255} case 6.2 &gt.
a[Lat(30:70),Long(-30:10),ansi("2009-09-30T23:59:00Z")]  return {red: 255.
green: 250.
blue: 0.
alpha: 255} case 20 &gt.
a[Lat(30:70),Long(-30:10),ansi("2009-09-30T23:59:00Z")]  return {red: 255.
green: 0.
blue: 0.
alpha: 255} default return {red: 255.
green: 255.
blue:255.
alpha: 0} ,"png")
as:
Can you write Python program for it?
 Give me a the Python program you requested?
assistant
#Here is the Python program you requested.

@wcps
def test_colortable():

    def less_than(cov, x):
        return  cov[axis('Lat', 30,70),
                  axis('Long', -30,10),
                  axis('ansi', "2009-09-30T23:59:00Z")] < x

    def rgba(r,g,b,a):
        return struct(red=r, green=g, blue=b, alpha=a)

    return For(a="CCI_V2_monthly_chlor_a")[
            encode(
                switch(
                    case(less_than(a, 0.05), rgba(255, 255, 255,   0)),
                    case(less_than(a,  0.1), rgba(  0, 255, 255, 255)),
                    case(less_than(a,  0.2), rgba(  0, 128, 255, 255)),
                    case(less_than(a,  0.5), rgba(  0,   0, 255, 255)),
                    case(less_than(a,  1.5), rgba(218,   0, 255, 255)),
                    case(less_than(a,  3.0), rgba(255,   0, 255, 255)),
                    case(less_than(a,  4.5), rgba(255, 164,   0, 255)),
                    case(less_than(a,  6.2), rgba(255, 250,   0, 255)),
                    case(less_than(a,   20), rgba(255,   0,   0, 255)),
                    default(rgba(255, 255, 255,  0))), "png")]

eo.ipython_image(test_colortable, { 'width': 400 })