code: def validate_values(self, definition):
          
  
          if not self._strict_type_checks:
              return
  
          # Validate the scalar kind.
          scalar_kind = definition.get('kind')
          if scalar_kind not in SCALAR_TYPES_MAP.keys():
              raise ParserError(self._name + ' - unknown scalar kind: ' + scalar_kind +
                                '.\nSee: {}'.format(BASE_DOC_URL))
  
          # Validate the collection policy.
          collection_policy = definition.get('release_channel_collection', None)
          if collection_policy and collection_policy not in ['opt-in', 'opt-out']:
              raise ParserError(self._name + ' - unknown collection policy: ' + collection_policy +
                                '.\nSee: {}#optional-fields'.format(BASE_DOC_URL))
  
          # Validate the cpp_guard.
          cpp_guard = definition.get('cpp_guard')
          if cpp_guard and re.match(r'\W', cpp_guard):
              raise ParserError(self._name + ' - invalid cpp_guard: ' + cpp_guard +
                                '.\nSee: {}#optional-fields'.format(BASE_DOC_URL))
  
          # Validate record_in_processes.
          record_in_processes = definition.get('record_in_processes', [])
          for proc in record_in_processes:
              if not utils.is_valid_process_name(proc):
                  raise ParserError(self._name + ' - unknown value in record_in_processes: ' + proc +
                                    '.\nSee: {}'.format(BASE_DOC_URL))
  
          # Validate the expiration version.
          # Historical versions of Scalars.json may contain expiration versions
          # using the deprecated format 'N.Na1'. Those scripts set
          # self._strict_type_checks to false.
          expires = definition.get('expires')
          if not utils.validate_expiration_version(expires) and self._strict_type_checks:
              raise ParserError('{} - invalid expires: {}.\nSee: {}#required-fields'
                                .format(self._name, expires, BASE_DOC_URL))
docs: This function checks that the fields have the correct values.
  
          :param definition: the dictionary containing the scalar properties.
          :raises ParserError: if a scalar definition field contains an unexpected value.