code: def _analyze_yaml_file(self, file, filename):
          
          if os.path.splitext(filename)[1] not in YAML_EXTENSIONS:
              # The yaml parser is pretty powerful. It eagerly
              # parses things when it's not even a yaml file. Therefore,
              # we use this heuristic to quit early if appropriate.
              raise yaml.YAMLError
  
          parser = YamlFileParser(
              file,
              exclude_lines_regex=self.exclude_lines_regex,
          )
          data = parser.json()
          ignored_lines = parser.get_ignored_lines()
          potential_secrets = {}
  
          to_search = [data]
          with self.non_quoted_string_regex():
              while len(to_search) > 0:
                  item = to_search.pop()
  
                  try:
                      if '__line__' in item and not item['__line__'] in ignored_lines:
                          potential_secrets.update(
                              self.analyze_string(
                                  item['__value__'],
                                  item['__line__'],
                                  filename,
                              ),
                          )
  
                      if '__line__' in item:
                          continue
  
                      for key in item:
                          obj = item[key] if isinstance(item, dict) else key
                          if isinstance(obj, dict):
                              to_search.append(obj)
                  except TypeError:
                      pass
  
          return potential_secrets
docs: :returns: same format as super().analyze()