role of a psychologist in a pretrial competency hearing