code: def get_oxi_state_decorated_structure(self, structure):
          
          s = structure.copy()
          if s.is_ordered:
              valences = self.get_valences(s)
              s.add_oxidation_state_by_site(valences)
          else:
              valences = self.get_valences(s)
              s = add_oxidation_state_by_site_fraction(s, valences)
          return s
docs: Get an oxidation state decorated structure. This currently works only
          for ordered structures only.
  
          Args:
              structure: Structure to analyze
  
          Returns:
              A modified structure that is oxidation state decorated.
  
          Raises:
              ValueError if the valences cannot be determined.