def _get_trigger_instance_db(self):
    if self._trigger_instance_file_path:
        return self._get_trigger_instance_db_from_file(file_path=os.path.realpath(self._trigger_instance_file_path))
    elif self._trigger_instance_id:
        trigger_instance_db = TriggerInstance.get_by_id(self._trigger_instance_id)
        trigger_db = Trigger.get_by_ref(trigger_instance_db.trigger)
        return (trigger_instance_db, trigger_db)
    raise ValueError('One of _trigger_instance_file_path or_trigger_instance_id should be specified.')
def _get_trigger_instance_db(self):
    if self._trigger_instance_file_path:
        return self._get_trigger_instance_db_from_file(file_path=os.path.realpath(self._trigger_instance_file_path))
    elif self._trigger_instance_id:
        trigger_instance_db = TriggerInstance.get_by_id(self._trigger_instance_id)
        trigger_db = Trigger.get_by_ref(trigger_instance_db.trigger)
        return (trigger_instance_db, trigger_db)
    raise ValueError('One of _trigger_instance_file_path or_trigger_instance_id should be specified.')