code: def pred_from_comp(self, composition):
          
          output = []
          predictions = self.pred_from_list(composition.elements)
          for p in predictions:
              subs = p['substitutions']
              charge = 0
              for i_el in composition.elements:
                  f_el = subs[i_el]
                  charge += f_el.oxi_state * composition[i_el]
              if charge == 0:
                  output.append(p)
          logging.info('{} charge balanced '
                       'compositions found'.format(len(output)))
          return output
docs: Similar to pred_from_list except this method returns a list after
          checking that compositions are charge balanced.