<prompt> Umepewa gridi ya gridi yenye fahirisi 0 m x n.Matrix ya diff yenye fahirisi 0 m x n diff imeundwa kwa utaratibu ufuatao: Acha idadi ya walio katika safu ya ith iwe onesRowi. Acha idadi ya zile katika safu wima jth iwe onesColj. Acha nambari ya sufuri katika safu mlalo ya ith iwe zerosRowi. Acha nambari ya sufuri katika safu wima ya jth iwe zerosColj. diffij onesRowi onesColj - zerosRowi - zerosColjRejesha _matrix ya tofauti_ diff.Mfano wa 1:Ingizo: gridi 0,1,1,1,0,1,0,0,1Pato: 0,0,4,0,0,4,-2,-2,2Maelezo:- diff00 onesRow0 onesCol0 - zerosRow0 - zerosCol0 2 1 - 1 - 2 0- diff01 onesRow0 onesCol1 - zerosRow0 - zerosCol1 2 1 - 1 - 2 0- diff02 onesRow0 onesCol2 - zerosRow0 - zerosCol2 2 3 - 1 - 0 4- diff10 onesRow1 onesCol0 - zerosRow1 - zerosCol0 2 1 - 1 - 2 0- diff11 onesRow1 onesCol1 - zerosRow1 - zerosCol1 2 1 - 1 - 2 0- diff12 onesRow1 onesCol2 - zerosRow1 - zerosCol2 2 3 - 1 - 0 4- diff20 onesRow2 onesCol0 - zerosRow2 - zerosCol0 1 1 - 2 - 2 -2- diff21 onesRow2 onesCol1 - zerosRow2 - zerosCol1 1 1 - 2 - 2 -2- diff22 onesRow2 onesCol2 - zerosRow2 - zerosCol2 1 3 - 2 - 0 2Mfano wa 2:Ingizo: gridi 1,1,1,1,1,1Pato: 5,5,5,5,5,5Maelezo:- diff00 onesRow0 onesCol0 - zerosRow0 - zerosCol0 3 2 - 0 - 0 5- diff01 onesRow0 onesCol1 - zerosRow0 - zerosCol1 3 2 - 0 - 0 5- diff02 onesRow0 onesCol2 - zerosRow0 - zerosCol2 3 2 - 0 - 0 5- diff10 onesRow1 onesCol0 - zerosRow1 - zerosCol0 3 2 - 0 - 0 5- diff11 onesRow1 onesCol1 - zerosRow1 - zerosCol1 3 2 - 0 - 0 5- diff12 onesRow1 onesCol2 - zerosRow1 - zerosCol2 3 2 - 0 - 0 5Vikwazo: m grid.length n gridi ya taifai.length 1 m, n 105 1 m n 105 gridiij ama ni 0 au 1.  <response>: def create_difference_matrixgridi: m, n lenigridi, lenigridi0 safu_ya_moja, safu_ya_moja 0 m, 0 n diff 0 n kwa _ katika safum kwa mimi katika safum: kwa j katika safun: ones_rowi gridiij ones_colj gridiij kwa mimi katika safum: kwa j katika safun: diffij safu_ya_mojai safu_za_mojaj - n - safu_safui - m - safu_ya_mojaj kurudi tofauti 