def METHOD_NAME(buff: AgentBuffer) -> "ActionLogProbs":
    """
    A static method that accesses continuous and discrete log probs fields in an AgentBuffer
    and constructs the corresponding ActionLogProbs from the retrieved np arrays.
    """
    continuous: torch.Tensor = None
    discrete: List[torch.Tensor] = None  # type: ignore
    if BufferKey.CONTINUOUS_LOG_PROBS in buff:
        continuous = ModelUtils.list_to_tensor(buff[BufferKey.CONTINUOUS_LOG_PROBS])
    if BufferKey.DISCRETE_LOG_PROBS in buff:
        discrete_tensor = ModelUtils.list_to_tensor(
            buff[BufferKey.DISCRETE_LOG_PROBS]
        )
        # This will keep discrete_list = None which enables flatten()
        if discrete_tensor.shape[1] > 0:
            discrete = [
                discrete_tensor[..., i] for i in range(discrete_tensor.shape[-1])
            ]
    return ActionLogProbs(continuous, discrete, None)