You can tell it's a function because if you flatten the individual line segments along the x-axes, they all connect to form one long line.
HOWEVER, if some of the dots at the end of each line segment were empty circles instead, then it would not be considered a function. You can think of these as holes, not allowing the line to connect in those or that area.