A little confusion about "is buyer market maker" part of trade stream.

Hey, I am playing around with receiving market data and visualizing/processing it but a little confused about how market makers/takers are defined.

With both individual and aggregate streams there is a parameter that is labeled as “m” in the stream, this data is defined as “is buyer the market maker” which is straight forward enough. However I am a little more interested in the intricacies of this definition.
If there is a sell order in the order book that is the current best sell price and a market buy comes in and eats it up then in this case the buyer is NOT the market maker. Same thing in the other direction, if there is a buy order which is the best buy price and a market sell comes in and eats that up the the buyer IS the market maker.

Now this is where things dont make sense to me, maybe because I just dont understand the market that well? Anyway, are these the only two ways this can happen? For instance lets say we have a stagnant market, buyer and sellers don’t want to budge, then a buyer comes along and places a limit order at a price and size that is big enough to take out the first sell order but not the second. Then the transaction that takes out the first seller would be labelled as m=false because the buyer is the taker and then the rest of his/her order would be placed in the order book as the best buy until another seller comes in and takes that order in which case that portion of the buy order would be labeled as m=True because in this transaction he/she is the maker correct?
What I’m trying to get at is, why is this parameter used/included (besides it being nice to have?)? Is there a scenario which I’m not thinking about that would need this clarification? In my head I’m thinking if price goes up from last transaction then obviously the seller is the market maker and if it goes down then the buyer is the market maker right?
I feel like I must be missing a scenario where “is market maker buyer” is necessary in order to clarify that ambiguous scenario.

Can someone please confirm or invalidate/refute my logic here?

Thank you.

Hi.
When thinking about maker and taker, please keep these points in mind:

  1. One order can have multiple trades.
  2. One trade involves a maker and a taker.

So, for the first question, are these the only two ways this can happen? The answer is yes. You can refer to the table below.

buyer (maker) buyer (taker)
seller (maker) not match m = false
seller(taker) m = true not match

Secondly, the example you given is the case that an order is split to multiple trade. Each trade should be judged separately. An order can have several taker trades and maker trades.

Hope this explanation is clear enough.