<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_sources_by_name(self, name):
 """Return a list of sources in the ROI matching the given name. The input name string can match any of the strings in the names property of the source object. Case and whitespace are ignored when matching name strings. Parameters name : str Returns ------- srcs : list A list of `~fermipy.roi_model.Model` objects. """


        index_name = name.replace(' ', '').lower()

        if index_name in self._src_dict:
            return list(self._src_dict[index_name])
        else:
            raise Exception('No source matching name: ' + name)