code: def create(cls, selection, config, **kwargs):
          
  
          if selection['target'] is not None:
              return cls.create_from_source(selection['target'],
                                            config, **kwargs)
          else:
              target_skydir = wcs_utils.get_target_skydir(selection)
              return cls.create_from_position(target_skydir, config, **kwargs)
docs: Create an ROIModel instance.