code: def get_resource_subscription(self, device_id, resource_path, fix_path=True):
          
          # When path starts with / we remove the slash, as the API can't handle //.
          # Keep the original path around however, as we use that for queue registration.
          fixed_path = resource_path
          if fix_path and resource_path.startswith("/"):
              fixed_path = resource_path[1:]
  
          api = self._get_api(mds.SubscriptionsApi)
          try:
              api.check_resource_subscription(device_id, fixed_path)
          except Exception as e:
              if e.status == 404:
                  return False
              raise
          return True
docs: Read subscription status.
  
          :param device_id: Name of device to set the subscription on (Required)
          :param resource_path: The resource path on device to observe (Required)
          :param fix_path: Removes leading / on resource_path if found
          :returns: status of subscription