code: def to_hdf5(input):
          
      with performance.Monitor('to_hdf5') as mon:
          for input_file in input:
              if input_file.endswith('.npz'):
                  output = convert_npz_hdf5(input_file, input_file[:-3] + 'hdf5')
              elif input_file.endswith('.xml'):  # for source model files
                  output = convert_xml_hdf5(input_file, input_file[:-3] + 'hdf5')
              else:
                  continue
              print('Generated %s' % output)
      print(mon)
docs: Convert .xml and .npz files to .hdf5 files.