parameters: (self, span)
docstring: Converts <span> elements with css attributes into <b> or <i> elements. Removes redundant elements and all css
          attributes.
          :param Tag span:
docstring_summary: Converts <span> elements with css attributes into <b> or <i> elements. Removes redundant elements and all css
          attributes.
          :param Tag span:
docstring_tokens: Converts <span > elements with css attributes into <b > or <i > elements . Removes redundant elements and all css attributes . : param Tag span :
function: def _standardize(self, span):
          """
          Converts <span> elements with css attributes into <b> or <i> elements. Removes redundant elements and all css
          attributes.
          :param Tag span:
          """
          if span['class'] == ['it-text']:
              if span.parent.name == 'i':
                  span.unwrap()
              else:
                  span.name = 'i'
  
          elif span['class'] == ['gemarra-regular']:
              if span.parent.name == 'b':
                  span.unwrap()
              else:
                  span.name = 'b'
  
          elif span['class'] == ['gemarra-italic']:
              if span.parent.name == 'b' or span.parent.name == 'i':
                  # This requirement is fulfilled within the logic of standaridze_tag.
                  raise AttributeError("gemarra-italic cannot have 'b' or 'i' as a parent!")
              else:
                  span.name = 'i'
                  span.wrap(self.soup.new_tag('b'))
          else:
              raise AttributeError("Eelement has no valid class")
          for attr in list(span.attrs.keys()):
              del span[attr]
function_tokens: def _standardize ( self , span ) : if span [ 'class' ] == [ 'it-text' ] : if span . parent . name == 'i' : span . unwrap ( ) else : span . name = 'i' elif span [ 'class' ] == [ 'gemarra-regular' ] : if span . parent . name == 'b' : span . unwrap ( ) else : span . name = 'b' elif span [ 'class' ] == [ 'gemarra-italic' ] : if span . parent . name == 'b' or span . parent . name == 'i' : # This requirement is fulfilled within the logic of standaridze_tag. raise AttributeError ( "gemarra-italic cannot have 'b' or 'i' as a parent!" ) else : span . name = 'i' span . wrap ( self . soup . new_tag ( 'b' ) ) else : raise AttributeError ( "Eelement has no valid class" ) for attr in list ( span . attrs . keys ( ) ) : del span [ attr ]