Override instrument configuration if configuration is not None

def obsres_from_oblock_id(self, obsid, configuration=None):
        """"
        Override instrument configuration if configuration is not None
        """
        este = self.ob_table[obsid]
        obsres = obsres_from_dict(este)
        _logger.debug("obsres_from_oblock_id id='%s', mode='%s' START", obsid, obsres.mode)
        try:
            this_drp = self.drps.query_by_name(obsres.instrument)
        except KeyError:
            raise ValueError('no DRP for instrument {}'.format(obsres.instrument))

        # Reserved names
        if obsres.mode in self._RESERVED_MODE_NAMES:
            selected_mode = None # null mode
        else:
            selected_mode = this_drp.modes[obsres.mode]

        if selected_mode:
            obsres = selected_mode.build_ob(obsres, self)
            obsres = selected_mode.tag_ob(obsres)

        if configuration:
            # override instrument configuration
            # obsres.configuration = self.search_instrument_configuration(
            #     obsres.instrument,
            #     configuration
            #)
            pass
        else:
            # Insert Instrument configuration
            pass
            # obsres.configuration = this_drp.configuration_selector(obsres)
        key, date_obs, keyname = this_drp.select_profile(obsres)
        obsres.configuration = self.assembly_instrument(key, date_obs, keyname)
        obsres.profile = obsres.configuration

        _logger.debug('obsres_from_oblock_id %s END', obsid)
        return obsres