human
What is a code to 1 given the following:
1. SteFCal: Theoretical derivation
Please derive, discuss and present the SteFCal calibration algorithm? [20] 
Subtotal 20
2. SteFCal: Practical implementation
a) Please Complete the following function. This function is suppose to be the SteFCal equivalent of create_G_LM. In other words it should compute g and G but instead of using LM it should use SteFCal. [20]"
Please write code following the instructions in jupyter notebook style.
assistant
#Here is code to 1.

   '''This function finds argmin G ||R-GMG^H|| using StEFCal.
   D is your observed visibilities matrx.
   M is your predicted visibilities.
   imax maximum amount of iterations.
   tau stopping criteria.
   g the antenna gains.
   G = gg^H.'''
   def create_G_stef(self,D,M,imax,tau):
       G = np.zeros(D.shape,dtype=complex)
       g = np.zeros((D.shape[0],D.shape[2]),dtype=complex)

       #Complete the rest of the function
         
       return g,G