this could just be inspect_function which checks the type of the DPD then follows the correct assoc to get either PF or TF. The logic should be the same for both.