How to get_terms for post type

By default WordPress get_terms function does not provide post type argument. But we’ve developed a solution for this.