code: def create_filehandlers(self, filenames, fh_kwargs=None):
          
          filenames = list(OrderedDict.fromkeys(filenames))
          logger.debug("Assigning to %s: %s", self.info['name'], filenames)
  
          self.info.setdefault('filenames', []).extend(filenames)
          filename_set = set(filenames)
          created_fhs = {}
          # load files that we know about by creating the file handlers
          for filetype, filetype_info in self.sorted_filetype_items():
              filehandlers = self.new_filehandlers_for_filetype(filetype_info,
                                                                filename_set,
                                                                fh_kwargs=fh_kwargs)
  
              filename_set -= set([fhd.filename for fhd in filehandlers])
              if filehandlers:
                  created_fhs[filetype] = filehandlers
                  self.file_handlers[filetype] = sorted(
                      self.file_handlers.get(filetype, []) + filehandlers,
                      key=lambda fhd: (fhd.start_time, fhd.filename))
  
          # update existing dataset IDs with information from the file handler
          self.update_ds_ids_from_file_handlers()
  
          # load any additional dataset IDs determined dynamically from the file
          self.add_ds_ids_from_files()
          return created_fhs
docs: Organize the filenames into file types and create file handlers.