code: def load_example(name):
      
      if name not in example_names:
          raise ValueError('no example with name (%s)' % name)
      else:
          return loadmat(os.path.join(example_dir, name + '.mat'),
                         struct_as_record=True)
docs: Load an example problem by name.
  
      Parameters
      ----------
      name : string (e.g. 'airfoil')
          Name of the example to load
  
      Notes
      -----
      Each example is stored in a dictionary with the following keys:
          - 'A'        : sparse matrix
          - 'B'        : near-nullspace candidates
          - 'vertices' : dense array of nodal coordinates
          - 'elements' : dense array of element indices
  
      Current example names are:%s
  
      Examples
      --------
      >>> from pyamg.gallery import load_example
      >>> ex = load_example('knot')