A political rally isn’t a government function.
As a Presidential candidate with official secret service protect it would qualify, I’m sure.
18 US Code Sec. 1752
(a) Whoever
(1) knowingly enters or remains in any restricted building or grounds without lawful authority to do so;
(2) knowingly, and with intent to impede or disrupt the orderly conduct of Government business or official functions, engages in disorderly or disruptive conduct in, or within such proximity to, any restricted building or grounds when, or so that, such conduct, in fact, impedes or disrupts the orderly conduct of Government business or official functions;
(3) knowingly, and with the intent to impede or disrupt the orderly conduct of Government business or official functions, obstructs or impedes ingress or egress to or from any restricted building or grounds; or
(4) knowingly engages in any act of physical violence against any person or property in any restricted building or grounds;
or attempts or conspires to do so, shall be punished as provided in subsection (b).
(b) The punishment for a violation of subsection (a) is
(1) a fine under this title or imprisonment for not more than 10 years, or both, if
(A) the person, during and in relation to the offense, uses or carries a deadly or dangerous weapon or firearm; or
(B) the offense results in significant bodily injury as defined by section 2118(e)(3); and
(2) a fine under this title or imprisonment for not more than one year, or both, in any other case.
(c) In this section
(1) the term restricted buildings or grounds means any posted, cordoned off, or otherwise restricted area
(A) of the White House or its grounds, or the Vice Presidents official residence or its grounds;
(B) of a building or grounds where the President or other person protected by the Secret Service is or will be temporarily visiting; or
(C) of a building or grounds so restricted in conjunction with an event designated as a special event of national significance; and
(2) the term other person protected by the Secret Service means any person whom the United States Secret Service is authorized to protect under section 3056 of this title or by Presidential memorandum, when such person has not declined such protection.
Don’t be trying to confuse the trumpbots with stupid ol facts.
I would imagine, as an example, that preventing a group of Secret Service agents from escorting a protected person would also be illegal, since it interferes with the security work they are doing, even though the act of driving down the street isn't a "government function" for the person riding in the motorcade.
But even without the particular law it is unacceptable for protesters to disrupt meetings or rallies, just as those same people would consider people disrupting a Sanders rally, or one of their discussion groups on campus to be unacceptable.
Ted, Secret Service protection is in place. It's funny how it's ok to disrupt a lawful gathering for your opponent. But, losers aren't worth the effort to disrupt.