def METHOD_NAME(self) -> BlockUsageLocator | LearningContextKey:
    """
    Returns the object ID parsed as a UsageKey or LearningContextKey.
    Raises InvalidKeyError object_id cannot be parse into one of those key types.
    Returns None if there's no object_id.
    """
    try:
        return LearningContextKey.from_string(str(self.object_id))
    except InvalidKeyError:
        return BlockUsageLocator.from_string(str(self.object_id))