Some rooms in the Torvus Bog will lock and you will have to defeat these guys or just survive for a while until they give up and run away.
The Dark Pirate Commandos put up a good fight. They are similar to the Chozo Ghosts in that they can warp in and out of the spacetime-continuum, making them difficult to lock on to. Use a charged Dark Beam blast against them to immobilize them, and hit them with a Missile.