I am trying to understand two of the answers to the question 114769 Package functions and symbolic calculations
ClearAll["MyP`*"];
BeginPackage["MyP`"];
Global`b;
MyLagrange;
Begin["Private"];
MyLagrange[f_, var_] := Module[{a}, a = D[f, var] + b;
a];
End[];
EndPackage[];
b = 17; MyLagrange[Sin[x1], x1]
returns
MyP`Private`b + Cos[x1]
so the Global statement has been ignored