code: def create_source(self, name, src_dict, build_index=True,
                        merge_sources=True, rescale=True):
          
  
          src_dict = copy.deepcopy(src_dict)
  
          if isinstance(src_dict, dict):
              src_dict['name'] = name
              src = Model.create_from_dict(src_dict, self.skydir,
                                           rescale=rescale)
          else:
              src = src_dict
              src.set_name(name)
  
          if isinstance(src, Source):
              src.set_roi_direction(self.skydir)
              src.set_roi_geom(self.geom)
  
          self.load_source(src, build_index=build_index,
                           merge_sources=merge_sources)
  
          return self.get_source_by_name(name)
docs: Add a new source to the ROI model from a dictionary or an
          existing source object.
  
          Parameters
          ----------
  
          name : str
  
          src_dict : dict or `~fermipy.roi_model.Source`
  
          Returns
          -------
  
          src : `~fermipy.roi_model.Source`