constrain the type of proposal in accep_reject_sample
with #1370 we changed the type of the proposal argument to accept_reject_sample to be Callable instead of torch.Distribution to enable passing a sample function directly.
https://github.com/sbi-dev/sbi/pull/1370#discussion_r1959346595
However, it is not controlled whether this callable function behaves like a sample function, e.g., whether it takes a sample_shape as argument. Thus, we have to bypass the type checker here.
As a solution, I suggest defining a protocal that has a callable method with sample_shape-like input argument.
Note, this kind of approach could also apply to the way we handle potential_fns, i.e., using Python protocols instead of abstract base classes for controlling the types.
To be discussed.