<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def assemble_component(compname, compinfo, hpx_order):
 """Assemble the source map file for one binning component Parameters compname : str The key for this component (e.g., E0_PSF3) compinfo : dict Information about this component hpx_order : int Maximum order for maps """

        sys.stdout.write("Working on component %s\n" % compname)
        ccube = compinfo['ccube']
        outsrcmap = compinfo['outsrcmap']
        source_dict = compinfo['source_dict']

        hpx_order = AssembleModel.copy_ccube(ccube, outsrcmap, hpx_order)
        hdulist = AssembleModel.open_outsrcmap(outsrcmap)

        for comp_name in sorted(source_dict.keys()):
            source_info = source_dict[comp_name]
            source_names = source_info['source_names']
            srcmap_file = source_info['srcmap_file']
            AssembleModel.append_hdus(hdulist, srcmap_file,
                                      source_names, hpx_order)
        sys.stdout.write("Done!\n")