eliminated `is_Tensor`; factored two helper functions out of `_contract`
eliminated set_free_args