Shrub with seed pods

I passed this unusual shrub on a recent walk in downtown Toronto. It had a profusion seedpods about 5 cm long, containing small, black seeds. Can anyone identify this plant?  …