async def METHOD_NAME(self, tables_cosmos_account_name, tables_primary_cosmos_account_key):
    # Arrange
    tsc = TableServiceClient(
        self.account_url(tables_cosmos_account_name, "cosmos"), credential=tables_primary_cosmos_account_key
    )
    minute_metrics = TableMetrics(
        enabled=True, include_apis=True, retention_policy=TableRetentionPolicy(enabled=True, days=366)
    )
    # Assert
    with pytest.raises(HttpResponseError):
        await tsc.set_service_properties(minute_metrics=minute_metrics)