How do I convert below comma delimited records -

```
COL1,COL2,COL3,COL4
A101,P501,U901,US_A
A101,P501,U902,US_B
A101,P502,U901,US_A
A102,P501,U901,US_A
A102,P502,U902,US_B

```

into **python dictionary** -

```
result = {
"A101": {
    "P501": {"U901": "US_A", "U902": "US_B"},
    "P502": {"U901": "US_A"}
},
"A102": {
    "P501": {"U901": "US_A"},
    "P502": {"U902": "US_B"}
}

```

}

Thank you for your help!