Return the typehint corresponding to a trait object.
Parameters:
trait (Any) – Trait instance. Also accept any other type of object.
mode (str) – If “short”, add a ~ in front of the full typehint to only print the type name
but still have a link. If minimal, only keep the name. If anything else, return
the fully qualified link.