def location_to_module(location): """Returns the IO module associated with a location string. Arguments --------- location : object Location of the source. Returns ------- module : module The module that handles the IO of the source specified by its location. """ if fl.is_file_list(location): return fl; else: return filename_to_module(location);