code: def set_ion_type(self, ion_type):
          
          if ion_type is self.ion_type:
              return self
          self.ion_type = ion_type
          self.line_comment = False
          return self
docs: Sets context to the given IonType.