docs: def complex_matrix_plot(A, logA=False, normalize=False, plot=True, **kwds):
      r"""A function to plot complex matrices."""
      N = len(A[0])
      if logA:
          Anew = []
          for i in range(N):
              row = []
              for j in range(N):
                  if A[i][j] != 0:
                      row += [log(log(A[i][j]))]
                  else:
                      row += [0.0]
              Anew += [row]
          A = Anew[:]
          # A=[[log(A[i][j]) for j in range(N)] for i in range(N)]
  
      if normalize:
          norm = 1
          for i in range(N):
              for j in range(N):
                  if abs(A[i][j]) > norm: norm = abs(A[i][j])
  
          A = [[A[i][j]/norm for j in range(N)]for i in range(N)]
  
      # print A
      color_matrix = []
      lmax = -1
      for i in range(N):
          row = []
          for j in range(N):
              rgb, l = complex_to_color(A[i][j])
              row += [rgb]
              if l > lmax:
                  lmax = l
          color_matrix += [row]
  
      if normalize:
          color_matrix = [[tuple([k/lmax for k in color_matrix[i][j]])
                           for j in range(N)] for i in range(N)]
  
      if plot:
          pyplot.imshow(color_matrix, interpolation='none')
          pyplot.savefig('a.png', bbox_inches='tight')
          pyplot.close('all')
      else:
          return color_matrix