code: def parse_type(cls, type_string):
          
          if type_string in cls.SENSOR_TYPE_LOOKUP:
              return cls.SENSOR_TYPE_LOOKUP[type_string]
          else:
              raise KatcpSyntaxError("Invalid sensor type string %s" %
                                     type_string)
docs: Parse KATCP formatted type code into Sensor type constant.
  
          Parameters
          ----------
          type_string : str
              KATCP formatted type code.
  
          Returns
          -------
          sensor_type : Sensor type constant
              The corresponding Sensor type constant.