'Retrieve a single definition by id, respecting the active bulk operation
on course_key.
Args:
course_key (:class:`.CourseKey`): The course being operated on
definition_guid (str or ObjectID): The id of the definition to load'

def get_definition(self, course_key, definition_guid):

    bulk_write_record = self._get_bulk_ops_record(course_key)
    if bulk_write_record.active:
        definition = bulk_write_record.definitions.get(definition_guid)
        if (definition is None):
            definition = self.db_connection.get_definition(definition_guid, course_key)
            bulk_write_record.definitions[definition_guid] = definition
            if (definition is not None):
                bulk_write_record.definitions_in_db.add(definition_guid)
        return definition
    else:
        definition_guid = course_key.as_object_id(definition_guid)
        return self.db_connection.get_definition(definition_guid, course_key)
