Honestly? I think it's a really bad idea. You might get lucky and get both an easy baby and an easy puppy, but chances are good that at least one of them won't be so obliging. At four months the pup won't be anywhere near trained, and will only have been in your home for 8 weeks so may not even be housetrained. How will you walk the dog with a newborn (bear in mind the puppy won't be lead trained yet either, so will bounce around like a mad thing not walk nicely at your side)? S/he will still be teething, so you'd not be able to leave ANYTHING of the baby's on the floor or within reach (and Sammies aren't tiny dogs so within reach may include on chairs etc). How will you manage to take the puppy to socialisation/training classes with a newborn?
And I hate to bring up the possibility, but what if difficulties occur - c-section, premature birth, some sort of illness or accident that means you need to stay in hospital or the baby does?
After your maternity leave, who will be home with the puppy, or will you arrange doggy daycare?
When you're exhausted from sleep deprivation or stuck on the sofa BFing (the 'every hour, on the hour, for an hour' joke regarding newborn feeding patterns is funny because it's a little bit true!), will you have the will to take pup for a walk, train it (several short sessions every day works best) and play with it?
I am an experienced dog owner, and I wouldn't take on a pup at that point. I'm also a breeder, and I wouldn't sell a puppy to anyone in that situation. You will probably make a good dog owner one day, but I'd be telling you if you approached me for a puppy to come back once you'd settled into motherhood. I'd be very suspicious that any breeder who was willing to sell a pup to a woman who's baby is due that soon after bringing the pup home was putting money above the welfare of the puppy.
I'm sorry to be so blunt, but I'd really rethink. If you want a dog, do right by it and wait until the time is right.