def METHOD_NAME(self):
    # Instantiate a DPS Service Client using a generated SAS token
    from azure.core.credentials import AzureSasCredential
    from azure.iot.deviceprovisioning import (
        DeviceProvisioningClient,
        generate_sas_token,
    )
    # Parse policy components from connection string
    policy_name = self.conn_str_parts["sharedaccesskeyname"]
    policy = self.conn_str_parts["sharedaccesskey"]
    # Generate SAS token (default TTL is 3600 ms, or 1 hour)
    sas_token = generate_sas_token(self.endpoint, policy_name, policy)
    # Create AzureSasCredential object
    credential = AzureSasCredential(signature=sas_token)
    dps_service_client = DeviceProvisioningClient(
        endpoint=self.endpoint, credential=credential
    )