import re


def get_subscription_path(project: str, subscription_name: str) -> str:
    """"Helper function to build topic subscription path from project and subscription name

      Args:
        project: GCP Project id
        subscription_name: PubSub Subscription name

      Returns:
        PubSub Subscription Path
  """
    if re.match('projects/([^/]+)/subscriptions/(.+)', subscription_name):
        return subscription_name

    return f"projects/{project}/subscriptions/{subscription_name}"