Is a lightfoot halfling obscured for the purposes of hiding while in the space of another creature?

Can a lightfoot halfling hide while in the space of some creature (like a Medium-sized or larger ally), and be hidden from an adjacent creature?

The halfling is not trying to hide from the creature with which it is sharing a space.