The same way you train violence out of a pitbull.
uhm .. if a pit is bred to be a fighting dog .. you aren't gonna traint hat out of it . It may be nice for people .. but they will still attack other dogs. They aren't a reliable pet-safe animals.
You get one that isn't from a fighting line .. you usually don't have too big of a problem, unless it's ever been used to fight. Then you're usually out of luck.
I'm not sure where you'll get a non-sporting group bred beagle from though lol.