def METHOD_NAME(self, service_id: str) -> Optional[str]:
    if not service_id:
        return None
    try:
        client = APISession(self.configuration.api_key.get_secret_value())
        client.url = self.configuration.pagerduty_api_url
        service = get_service(
            client=client,
            service_id=service_id,
        )
        if service:
            escalation_policy_id = service["escalation_policy"]["id"]
            escalation_policy = get_escalation_policy(
                client=client,
                escalation_policy_id=escalation_policy_id,
            )
            if escalation_policy:
                return escalation_policy["escalation_rules"][0]["targets"][0]["id"]
    except Exception as e:
        log.error("Error trying to retrieve schedule_id from service_id")
        log.exception(e)