code: def v_res(self, nodes=None, level=None):
          
          # check if voltages are available:
          if hasattr(self, 'pfa_v_mag_pu'):
              self.pfa_v_mag_pu.sort_index(axis=1, inplace=True)
          else:
              message = "No voltage results available."
              raise AttributeError(message)
  
          if level is None:
              level = ['mv', 'lv']
  
          if nodes is None:
              return self.pfa_v_mag_pu.loc[:, (level, slice(None))]
          else:
              not_included = [_ for _ in nodes
                              if _ not in list(self.pfa_v_mag_pu[level].columns)]
              labels_included = [_ for _ in nodes if _ not in not_included]
  
              if not_included:
                  logging.warning("Voltage levels for {nodes} are not returned "
                                  "from PFA".format(nodes=not_included))
              return self.pfa_v_mag_pu[level][labels_included]
docs: Get resulting voltage level at node.
  
          Parameters
          ----------
          nodes : :obj:`list`
              List of string representatives of grid topology components, e.g.
              :class:`~.grid.components.Generator`. If not provided defaults to
              all nodes available in grid level `level`.
          level : :obj:`str`
              Either 'mv' or 'lv' or None (default). Depending on which grid
              level results you are interested in. It is required to provide this
              argument in order to distinguish voltage levels at primary and
              secondary side of the transformer/LV station.
              If not provided (respectively None) defaults to ['mv', 'lv'].
  
          Returns
          -------
          :pandas:`pandas.DataFrame<dataframe>`
              Resulting voltage levels obtained from power flow analysis