The main fuel pump of my 1984 E24 recently self-destructed so I learned a bit about these parts.
Basically, they’re very generic. The same part is used on many other contemporary BMW models, and some parts houses even offer the same part for the early E30 as for the E24.
Basically, the pump is shaped like a metal tube, and the “in-flow” side is the one with the thicker hose, on the side away from the electrical terminals.
The terminals are marked “+” and “-” respectively though the markings can be hard to discern especially if the outside of the pump is dirty. Another way I identify the positive side is that it’s the one with the slightly thicker post, the one that takes the 8mm nut. The slightly narrower one is the negative side, and it takes a 7mm nut.
On my E24, the pump was mounted in a removable cradle that it shared with the inline main fuel filter.
Three 10mm nuts affixed the cradle to the body thanks to some studs protruding downwards.