original_docstring: 
      generate the media, like COMMEMI 2D-0 model
  
      plot_flag: plot the media model or not.
      
docstring: generate the media, like COMMEMI 2D-0 model
  plot_flag: plot the media model or not.
docstring_tokens: generate the media like COMMEMI 2D - 0 model plot_flag : plot the media model or not .
code: def generate_media(plot_flag="True"):
      '''
      generate the media, like COMMEMI 2D-0 model
  
      plot_flag: plot the media model or not.
      '''
      ny = 100
      nz = 100
      y1 = np.linspace(-2e5,-1e4,ny+1)[:-1]
      y2 = np.linspace(-1e4,1e4,ny+1)[:-1]
      y3 = np.linspace(1e4,2e5,ny)
      z1 = np.linspace(-2e5,0,nz+1)[:-1]
      z2 = np.linspace(0, 5e4,nz+1)[:-1]
      z3 = np.linspace(5e4,2e5,nz)
      y  = np.concatenate((y1,y2,y3))
      z  = np.concatenate((z1,z2,z3))
      Y,Z= np.meshgrid(y,z)
      BCy = [0,ny,2*ny,3*ny]
      BCz = [0,nz,2*nz,3*nz]
      sigma = np.array([[1e-9,1e-9,1e-9],[1e-1,1,5e-1],[1e1,1e1,1e1]])
      Sigma = np.ones_like(Y)
      for ii in range(len(BCy)-1):
          for jj in range(len(BCz)-1):
              Sigma[BCz[jj]:BCz[jj+1],BCy[ii]:BCy[ii+1]]=sigma[jj,ii]
      BCy0 = [0,ny,2*ny,3*ny-1]
      BCz0 = [0,nz,2*nz,3*nz-1]
      # conductivity of the left
      sigL = sigma[:,0]
      # thickness of the left
      hL   = np.array([z[BCz0[i+1]]-z[BCz0[i]] for i in range(len(BCz0)-1)])
      # conductivity of the right
      sigR = sigma[:,-1]
      # conductivity of the right
      hR   = hL
      if plot_flag=="True":
          fig = plt.figure(figsize=(10,4))
          ax = plt.subplot(1,2,1)
          h = ax.pcolormesh(Y,Z, np.log10(Sigma), 
                            cmap='jet',shading='auto')
          ax.invert_yaxis()
          fig.colorbar(h)
          plt.show()
      return Y,Z,ny,nz,Sigma,sigL,hL,sigR,hR
code_tokens: def generate_media ( plot_flag = "True" ) : ny = 100 nz = 100 y1 = np . linspace ( - 2e5 , - 1e4 , ny + 1 ) [ : - 1 ] y2 = np . linspace ( - 1e4 , 1e4 , ny + 1 ) [ : - 1 ] y3 = np . linspace ( 1e4 , 2e5 , ny ) z1 = np . linspace ( - 2e5 , 0 , nz + 1 ) [ : - 1 ] z2 = np . linspace ( 0 , 5e4 , nz + 1 ) [ : - 1 ] z3 = np . linspace ( 5e4 , 2e5 , nz ) y = np . concatenate ( ( y1 , y2 , y3 ) ) z = np . concatenate ( ( z1 , z2 , z3 ) ) Y , Z = np . meshgrid ( y , z ) BCy = [ 0 , ny , 2 * ny , 3 * ny ] BCz = [ 0 , nz , 2 * nz , 3 * nz ] sigma = np . array ( [ [ 1e-9 , 1e-9 , 1e-9 ] , [ 1e-1 , 1 , 5e-1 ] , [ 1e1 , 1e1 , 1e1 ] ] ) Sigma = np . ones_like ( Y ) for ii in range ( len ( BCy ) - 1 ) : for jj in range ( len ( BCz ) - 1 ) : Sigma [ BCz [ jj ] : BCz [ jj + 1 ] , BCy [ ii ] : BCy [ ii + 1 ] ] = sigma [ jj , ii ] BCy0 = [ 0 , ny , 2 * ny , 3 * ny - 1 ] BCz0 = [ 0 , nz , 2 * nz , 3 * nz - 1 ] sigL = sigma [ : , 0 ] hL = np . array ( [ z [ BCz0 [ i + 1 ] ] - z [ BCz0 [ i ] ] for i in range ( len ( BCz0 ) - 1 ) ] ) sigR = sigma [ : , - 1 ] hR = hL if plot_flag == "True" : fig = plt . figure ( figsize = ( 10 , 4 ) ) ax = plt . subplot ( 1 , 2 , 1 ) h = ax . pcolormesh ( Y , Z , np . log10 ( Sigma ) , cmap = 'jet' , shading = 'auto' ) ax . invert_yaxis ( ) fig . colorbar ( h ) plt . show ( ) return Y , Z , ny , nz , Sigma , sigL , hL , sigR , hR
short_docstring: generate the media, like COMMEMI 2D-0 model
  plot_flag: plot the media model or not.
short_docstring_tokens: generate the media like COMMEMI 2D - 0 model plot_flag : plot the media model or not .
comment: '''
      generate the media, like COMMEMI 2D-0 model
  
      plot_flag: plot the media model or not.
      '''$SEP$# conductivity of the left$SEP$# thickness of the left$SEP$# conductivity of the right$SEP$# conductivity of the right