Convert the following IDL code in python:
araw = readfits(raw,header)
abias = readfits(bias)
aflat = readfits(flat)
;
; operations
;
netraw = araw - abias
calibrated = netraw / aflat
;
; write output file
;
iimage=UINT(ROUND(calibrated))
writefits,'cd_'+raw,iimage,header