Optimizing a parameter for an outside function

It shouled be
sales_hat = pm.Normal('sales_hat', mu=mu, sd=sigma, observed=sales)