How to get Default billing and Shipping address by customer id in magento 2?

In Magento 2 we can get Customer Default billing and Shipping address by customer id using below code snippet,
Using Block file get customer’s default billing and shipping address,

Call required function in template file,