code: def s_res(self, components=None):
          
          if components is None:
              return self.apparent_power
          else:
              not_included = [_ for _ in components
                              if _ not in self.apparent_power.index]
              labels_included = [_ for _ in components if _ not in not_included]
  
              if not_included:
                  logging.warning(
                      "No apparent power results available for: {}".format(
                          not_included))
              return self.apparent_power.loc[:, labels_included]
docs: Get apparent power in kVA at line(s) and transformer(s).
  
          Parameters
          ----------
          components : :obj:`list`
              List of string representatives of :class:`~.grid.components.Line`
              or :class:`~.grid.components.Transformer`. If not provided defaults
              to return apparent power of all lines and transformers in the grid.
  
          Returns
          -------
          :pandas:`pandas.DataFrame<dataframe>`
              Apparent power in kVA for lines and/or transformers.