Does bacteria fix nitrogen?

Some bacteria that are helpful but the virus bacterias never do. So it really depends!