code: def _validate_python_type(self, python_type):
          
  
          if python_type == 'bool':
              if self.variable:
                  raise ArgumentError("You can only specify a bool python type on a scalar (non-array) type_name", type_name=self.type_name)
  
              return
  
          if python_type == 'string':
              if not (self.variable and self.unit_size == 1):
                  raise ArgumentError("You can only pass a string python type on an array of 1-byte objects", type_name=self.type_name)
  
              return
  
          if python_type is not None:
              raise ArgumentError("You can only declare a bool or string python type.  Otherwise it must be passed as None", python_type=python_type)
docs: Validate the possible combinations of python_type and type_name.