code: def check_input(Verts=None, E2V=None, Agg=None, A=None, splitting=None,
                  mesh_type=None):
      
      if Verts is not None:
          if not np.issubdtype(Verts.dtype, np.floating):
              raise ValueError('Verts should be of type float')
  
      if E2V is not None:
          if not np.issubdtype(E2V.dtype, np.integer):
              raise ValueError('E2V should be of type integer')
          if E2V.min() != 0:
              warnings.warn('element indices begin at %d' % E2V.min())
  
      if Agg is not None:
          if Agg.shape[1] > Agg.shape[0]:
              raise ValueError('Agg should be of size Npts x Nagg')
  
      if A is not None:
          if Agg is not None:
              if (A.shape[0] != A.shape[1]) or (A.shape[0] != Agg.shape[0]):
                  raise ValueError('expected square matrix A\
                                    and compatible with Agg')
          else:
              raise ValueError('problem with check_input')
  
      if splitting is not None:
          splitting = splitting.ravel()
          if Verts is not None:
              if (len(splitting) % Verts.shape[0]) != 0:
                  raise ValueError('splitting must be a multiple of N')
          else:
              raise ValueError('problem with check_input')
  
      if mesh_type is not None:
          valid_mesh_types = ('vertex', 'tri', 'quad', 'tet', 'hex')
          if mesh_type not in valid_mesh_types:
              raise ValueError('mesh_type should be %s' %
                               ' or '.join(valid_mesh_types))
docs: Check input for local functions.