                 FOR PUBLICATION
 UNITED STATES COURT OF APPEALS
      FOR THE NINTH CIRCUIT

UNITED STATES OF AMERICA,                 No. 06-50441
                Plaintiff-Appellee,          D.C. No.
               v.
                                          CR-05-00765-
                                             GPS-01
GORDON DOUGLAS COPE, JR.,
             Defendant-Appellant.          ORDER AND
                                           OPINION

       Appeal from the United States District Court
           for the Central District of California
       George P. Schiavelli, District Judge, Presiding

                  Argued and Submitted
            June 4, 2007—Pasadena, California

                     Filed June 4, 2008

    Before: Sidney R. Thomas, Raymond C. Fisher, and
             Ronald M. Gould, Circuit Judges.

                 Opinion by Judge Thomas




                            6325
                    UNITED STATES v. COPE                 6329
                         COUNSEL

Sean K. Kennedy, Acting Federal Public Defender, and Eliza-
beth A. Newman (argued), Deputy Federal Public Defender,
Los Angeles, California, for the appellant.

George S. Cardona, Acting United States Attorney, Thomas
P. O’Brien, Assistant United States Attorney, and Andrea L.
Russi (argued), Assistant United States Attorney, Los Ange-
les, California, for the appellee.


                          ORDER

   The panel has decided to withdraw the opinion filed
November 5, 2007. The opinion is withdrawn and a substi-
tuted opinion is filed concurrently with this order.

  With the filing of the substituted opinion, the panel has
voted to deny the petition for rehearing and to reject the sug-
gestion for rehearing en banc.

  The full court has been advised of the suggestion for
rehearing en banc, and no judge of the court has requested a
vote on the suggestion for rehearing en banc. Fed. R. App. P.
35(b).

  The petition for rehearing is denied and the suggestion for
rehearing en banc is rejected. No further petitions for rehear-
ing or rehearing en banc will be allowed.


                         OPINION

THOMAS, Circuit Judge:

   In this appeal we consider, among other matters, whether
the district court’s imposition of a lifetime of supervised
6330                UNITED STATES v. COPE
release was reasonable and whether the district court was
required to articulate findings before imposing certain special
conditions of supervised release pertaining to medication.
Under the circumstances presented by this case, we conclude
that the term of supervised release imposed was reasonable,
but that the district court should have articulated findings
before imposing special conditions of release that would
implicate a particularly significant liberty interest of the
defendant. Therefore, we affirm in part, vacate the sentence
in part, and remand for further proceedings.

                               I

   In September of 2003, San Bernardino Sheriff’s Depart-
ment deputies discovered over 600 images and 20 videos of
child pornography on Gordon Cope’s home computers,
including “videos of sadistic and masochistic acts.” On March
10, 2006, Cope pled guilty to one count of possession of child
pornography, in violation of 18 U.S.C. § 2252A(a)(5)(B).
Cope entered his plea pursuant to a plea agreement with the
government in which both parties stipulated to a total offense
level of 28 under the United States Sentencing Guidelines,
including numerous upward adjustments relating to the child
pornography possession. The government conditionally
agreed to seek the low end of the Guidelines range for incar-
ceration, but made no agreement as to what term of super-
vised release it would seek. In return, Cope agreed to waive
his statutory right to appeal “any sentence imposed by” the
district court, provided certain requirements were met. Cope
retained his right to appeal most of the special conditions of
his supervised release.

   Following the change of plea hearing, the probation office
prepared, using the November 2002 Sentencing Guidelines, a
presentence report (“PSR”) recommending a total offense
level of 25 and a criminal history category of II. This would
ordinarily result in an advisory Guidelines range of 63 to 78
months. However, Cope’s 1981 conviction for attempted sex-
                     UNITED STATES v. COPE                  6331
ual assault on a child triggered a statutory mandatory mini-
mum sentence of 120 months under 18 U.S.C. § 2252A(b)(2).
The PSR noted that the Guidelines range for supervised
release was 2-3 years, but did not mention that the Guidelines
contained a policy statement recommending the statutory
maximum term of supervised release for those convicted of
sex offenses. U.S.S.G. § 5D1.2(c) (Nov. 2002). The statute in
effect at the time of Cope’s offense, like the one in effect
now, provided for a lifetime term of supervised release as the
statutory maximum for crimes involving possession of child
pornography. 18 U.S.C. § 3583(k) (2007); 18 U.S.C.
§ 3583(k) (2003). In response to the PSR, the government
filed a sentencing memorandum recommending that Cope
receive the maximum term of supervised release in accor-
dance with the Guidelines policy statement. Cope filed a
memorandum requesting a prison sentence of less than ten
years and a term of supervised release of less than life. Cope
specifically objected to any special condition of supervised
release of which he had not been given notice.

   The district court held a sentencing hearing on July 10,
2006. After hearing from the parties, the district court sen-
tenced Cope — 58 years old at the time of sentencing — to
120 months in prison, the statutory minimum, and a lifetime
term of supervised release. The district court explained that a
three-year term of supervised release was not sufficient in
light of Cope’s criminal history, particularly his guilty plea to
attempted sexual assault on a child. Instead, the district court
found that a lifetime term of supervised release was necessary
based on the interest in

    the protection of society that the government has
    referred to . . . . [T]he nature of the offense, the type
    of materials that were seized; and I think that the
    protection of society, particularly in instances of the
    protection of minors from this kind of offense, is a
    paramount concern, obviously, to the government,
    also to the court.
6332                     UNITED STATES v. COPE
The district court also imposed a number of special conditions
of supervised release, including a condition requiring Cope to
participate in sex offender treatment. As part of that treat-
ment, the district court imposed conditions requiring Cope to
submit to polygraph testing, penile plethysmograph testing,
and Abel testing, and to take all prescribed medication.1
Another condition prohibits Cope from possessing any mate-
rials “depicting and/or describing child pornography as
defined in 18 United States Code section 2256, subdivision
eight.” Although the district court notified the parties that it
was considering a special condition requiring Cope to partici-
pate in sex offender treatment, the court made no mention,
prior to its announcement of the sentence, sub-conditions
relating to testing or medication. This timely appeal followed.

                                     II

   We review a defendant’s sentence for reasonableness, con-
sidering whether the district court accurately calculated the
Guidelines range and whether the sentence is reasonable in
light of the 18 U.S.C. § 3553(a) factors. United States v.
Reina-Rodriguez, 468 F.3d 1147, 1158 (9th Cir. 2006). We
review conditions of supervised release for abuse of discre-
tion. United States v. Williams, 356 F.3d 1045, 1052 (9th Cir.
2004).
  1
    As we explained in detail in United States v. Weber, 451 F.3d 552 (9th
Cir. 2006), penile plethysmograph testing involves placing a device on a
man’s penis to “measure[ ] its circumference and thus the level of the sub-
ject’s arousal as he is shown sexually explicit slides or listens to sexually
explicit audio scenes,” id. at 562 (internal quotation marks omitted).
Plethysmograph testing has become a fairly common component of sex
offender treatment programs. Id. Abel testing, a far less intrusive proce-
dure, “involves exhibiting photographs to an individual and measuring the
length of time he looks at each picture.” Id. at 567. Abel testing should not
be confused with “Abel’s test,” a mathematical method of testing for the
convergence of an infinite series.
                    UNITED STATES v. COPE                  6333
                              III

   Cope argues it was unreasonable for the district court to
sentence him to a lifetime term of supervised release. He also
argues the district court did not adequately explain why the
lifetime term was necessary. Before reaching the merits of
this challenge, we must determine whether Cope waived his
right to appeal this aspect of his sentence. United States v.
Michlin, 34 F.3d 896, 898 (9th Cir. 1994) (“Our first task is
to assess the validity of the plea agreement.”). We review de
novo the waiver of a statutory right to appeal. United States
v. Bolinger, 940 F.2d 478, 479 (9th Cir. 1991). As long as the
waiver is made voluntarily and knowingly, a defendant may
waive his statutory right to appeal his sentence. United States
v. Baramdyka, 95 F.3d 840, 843 (9th Cir. 1996); United States
v. Navarro-Botello, 912 F.2d 318, 319, 321 (9th Cir. 1990).

   In reviewing a waiver of appeal, we first examine “the cir-
cumstances surrounding the signing and entry of the plea
agreement to determine whether the defendant agreed to its
terms knowingly and voluntarily.” Baramdyka, 95 F.3d at
843. Cope does not contend that he entered into his plea
agreement and waiver unknowing or involuntarily. Indeed,
the district court conducted a full Rule 11 colloquy with the
defendant during his change of plea hearing, during which the
court confirmed Cope’s understanding of the waiver of his
right to appeal his sentence if certain conditions were met.
Accordingly, we are satisfied that Cope agreed to the terms of
the waiver knowingly and voluntarily. See id. at 844.

   Next, we determine the scope of the waiver — whether the
waiver precludes the defendant’s appeal — based on the lan-
guage used in the plea agreement. Id. at 843. For the most
part, we interpret plea agreements “ ‘using the ordinary rules
of contract interpretation.’ ” United States v. Transfiguracion,
442 F.3d 1222, 1228 (9th Cir. 2006) (quoting Brown v. Poole,
337 F.3d 1155, 1159 (9th Cir. 2003)). The drafter of the plea
agreement — usually the government, as was the case here —
6334                 UNITED STATES v. COPE
bears responsibility for any lack of clarity, such that
“[a]mbiguities are . . . construed ‘in favor of the defendant,’ ”
id. (quoting United States v. Franco-Lopez, 312 F.3d 984, 989
(9th Cir. 2002)), and “the government is ordinarily held to the
literal terms of the plea agreement it made,” id.

   Cope agreed to waive his right to appeal “any sentence
imposed by the Court, and the manner in which the sentence
is determined,” so long as

    (a) the sentence is within the statutory maximum
    specified above and is constitutional, (b) the Court in
    determining the applicable guideline range does not
    depart upward in offense level or criminal history
    category and determines that the total offense level
    is 28 or below, and (c) the Court imposes a sentence:
    (1) within or below the range corresponding to the
    determined total offense level and criminal history
    category; or (2) at the statutory mandatory minimum.

   The plea agreement also stated that a lifetime term of
supervised release was the statutory maximum that could be
imposed, and that the government “makes no agreement as to
the term of supervised release to be imposed.” The plea agree-
ment made clear that, as an exception to the general waiver
of his appellate rights, Cope retained the right to appeal some
of the conditions of his supervised release.

   [1] The length of Cope’s term of supervised release is part
of his “sentence,” and is not a condition of his supervised
release. See Weber, 451 F.3d at 559 (“We have long held that
a term of supervised release is part of a defendant’s sentence
. . . .”); 18 U.S.C. § 3583(a) (providing that the court “may
include as a part of the sentence a requirement that the defen-
dant be placed on a term of supervised release”) (emphasis
added). Thus, the length of Cope’s term of supervised release
does not fall into the exception provided for appeal of certain
conditions of his supervised release. Under the language of
                       UNITED STATES v. COPE                       6335
the waiver, Cope is barred from appealing the length of his
supervised release unless any one of the prerequisites stated
above has not been met.

   The prerequisites set forth in Cope’s waiver agreement will
be met, and Cope’s appeal of the length of his term of super-
vised release is barred, if Cope’s sentence is (a) within the
statutory maximum and is constitutional, (b) not based on an
upward departure or an offense level above 28, and (c) is
either within or below the Sentencing Guidelines range corre-
sponding to Cope’s offense level and criminal history cate-
gory or is at the statutory mandatory minimum. It is
undisputed that Cope’s 120-month term of incarceration
meets these requirements because it is at the statutory manda-
tory minimum for a defendant with a prior conviction relating
to sexual abuse.

   [2] Accordingly, Cope’s ability to appeal the length of his
supervised release must be based on the nonconformity of that
term of supervised release with the stated requirements.
Addressing each prerequisite in turn, we conclude that a life-
time term of supervised release is within the statutory maxi-
mum for a crime involving child pornography, the range of
which is “any term of years or life.” 18 U.S.C. § 3583(k) (2003).2
The second requirement is also met because the district court
did not depart upward. As for the third requirement, a lifetime
term of supervised release is not at the statutory mandatory
minimum, which would be “any term of years.” 18 U.S.C.
§ 3583(k) (2003). This means Cope’s appeal is barred only if
his lifetime term is “within or below the range corresponding
to the determined total offense level and criminal history cate-
gory.”

  [3] As drafted, however, this provision cannot sensibly be
applied to a term of supervised release. Under the Sentencing
  2
   The current version of the statute has a supervised release range of
“any term of years not less than 5, or life.” 18 U.S.C. § 3583(k) (2007).
6336                 UNITED STATES v. COPE
Guidelines, the offense level and criminal history category do
not control the term of supervised release, as they do the term
of imprisonment. Rather, the type of offense determines the
length of the Guidelines range for the term of supervised
release. See U.S.S.G. § 5D1.2(a) (Nov. 2002) (specifying
supervised release range for Class C felonies); 18 U.S.C.
§ 3559(a)(3) (Class C felony defined as a crime with a maxi-
mum term of imprisonment between 10 and 25 years); 18
U.S.C. § 2252A(b)(2) (2003) (maximum term for Cope’s
crime is 20 years). This ambiguity in the waiver provision
makes it impossible for us to determine whether the prerequi-
sites for waiver have been met with regard to Cope’s term of
supervised release. Because we “steadfastly” apply the rule
that “any lack of clarity” in a plea agreement should be con-
strued against the government as drafter, Transfiguracion,
442 F.3d at 1228 (internal quotation marks omitted), we hold
that this ambiguity in the waiver provision permits Cope to
appeal the length of his term of supervised release.

                               IV

   Having established that Cope has not waived his right to
appeal his term of supervised release, we must determine
whether it was reasonable for the district court to sentence
Cope to a lifetime term of supervision following his eventual
release from prison. The parties do not dispute that the district
court accurately calculated the Guidelines range. The only
issues on appeal are whether the district court adequately
stated its reasons for imposing the lifetime term, 18 U.S.C.
§ 3553(c), and whether the lifetime term is reasonable in light
of the § 3553(a) factors, id. § 3583(c). We answer both ques-
tions in the affirmative.

  [4] In this case, “[t]he record makes clear that the sentenc-
ing judge listened to each argument” regarding the length of
Cope’s term of supervised release and “considered the sup-
porting evidence.” Rita v. United States, 551 U.S. ___, 2007
WL 1772146, at *13 (2007). After hearing from the parties,
                         UNITED STATES v. COPE                          6337
the district court stated on the record that it had considered the
§ 3553(a) factors. It further stated that Cope’s criminal back-
ground, including a prior conviction for attempted sexual
assault in 1981, rendered three years of supervised release insuf-
ficient.3 Instead, the district court explained that a lifetime
term of supervised release was necessary given the need for
“protection of society, particularly in instances of the protec-
tion of minors from this kind of offense,” in light of “the
nature of [Cope’s] offense” and “the type of materials that
were seized.” The district court also stated that it was taking
into account the fact that Cope would be around 68 upon his
release from custody, indicating that even if the court were to
sentence Cope to an actual term of years, rather than life, it
would choose a term of years that would have similar effect.
These statements meet the requirements of 18 U.S.C.
§ 3553(c) and amount to sufficient explanation, in open court,
of the reasons for imposing a lifetime term of supervised
release. As the Supreme Court has stated, “[t]he sentencing
judge should set forth enough to satisfy the appellate court
that he has considered the parties’ arguments and has a rea-
soned basis for exercising his own legal decisionmaking
authority.” See Rita, 2007 WL 1772146, at *12. We are satis-
fied with the district court’s explanation.

   Next, we examine whether Cope’s lifetime term of super-
vised release was reasonable. The parties disagree as to
whether we should review the length of a term of supervised
release for reasonableness, the standard we use when review-
ing sentences, Reina-Rodriguez, 468 F.3d at 1158, or abuse of
  3
    Cope is correct that the district court misstated some of the facts relat-
ing to his prior conviction. The district court incorrectly stated that the
1981 attempted sexual abuse involved Cope’s daughter and resulted in two
felony convictions, rather than one. The record shows, however, that any
error was harmless. The district court believed a lifetime term of super-
vised release was necessary given Cope’s recidivism and his longstanding
sexual interest in children. It is irrelevant, in this context, whether Cope’s
prior sex offense involved his daughter or a child unrelated to him, or
whether the 1981 incident led to two felony convictions or only one.
6338                 UNITED STATES v. COPE
discretion, the standard we use when reviewing conditions of
supervised release, Williams, 356 F.3d at 1052. Because the
length of a term of supervised release is not a condition of that
release, but instead is part of a defendant’s sentence, see
Weber, 451 F.3d at 559; 18 U.S.C. § 3583(a), we review for
reasonableness the district court’s decision to sentence Cope
to a lifetime term of supervised release. See also United States
v. Hayes, 445 F.3d 536, 537 (2d Cir. 2006) (reviewing a life-
time term of supervised release for reasonableness).

    [5] The district court’s statements, discussed above, dem-
onstrate that the lifetime term is not greater than necessary, 18
U.S.C. § 3553(a), and is reasonable in light of the nature of
Cope’s offense, id. § 3553(a)(1), his history of having a sex-
ual interest in children as early as 1981 and as late as 2003,
id., and the need to protect the public once Cope leaves
prison, id. § 3553(a)(2)(C). The lifetime term is also reason-
able in light of the “pertinent policy statement,” id.
§ 3553(a)(5), issued by the Sentencing Commission, which
recommends the maximum term of supervised release for sex
offenses, U.S.S.G. § 5D1.2(c). The Sentencing Guidelines’
definition of “sex offense” includes child pornography pos-
session. United States v. Allison, 447 F.3d 402, 405 (5th Cir.
2006); United States v. Kimler, 335 F.3d 1132, 1147 (10th
Cir. 2003); 18 U.S.C. § 2252A (statute is located in Chapter
110 of title 18, which falls under the definition). Accordingly,
a lifetime term of supervised release for Cope is consistent
with the policy statement’s recommendation. See 18 U.S.C.
§ 3583(k) (2003) (lifetime statutory maximum). Moreover,
although their opinions do not necessarily render the sentence
reasonable in this particular case, some of our sister circuits
have held that life terms of supervised release are reasonable
for those convicted of possession of child pornography. See
Hayes, 445 F.3d at 537 (2d Cir. 2006) (“The fact that Hayes
. . . already was a recidivist [ ] weakens substantially his argu-
ment that” a lifetime term was unreasonable.); United States
v. Gonzalez, 445 F.3d 815, 820 (5th Cir. 2006) (lifetime term
for possession of child pornography was reasonable); see also
                     UNITED STATES v. COPE                  6339
United States v. Moriarty, 429 F.3d 1012, 1025 (11th Cir.
2005) (lifetime term did not violate Eighth Amendment).
Therefore, under our deferential standard of review and the
circumstances of this case, we uphold the district court’s sen-
tence of a lifetime term of supervised release.

                               V

   Cope challenges certain special conditions of his super-
vised release on the grounds that (1) he did not receive notice
of the conditions prior to the district court’s announcement of
the sentence, and (2) that the district court failed to make ade-
quate findings to support the special conditions of release.
The government concedes, at least in part, that these chal-
lenges have merit and that a remand is therefore required.

                               A

   [6] “Where a condition of supervised release is not on the
list of mandatory or discretionary conditions in the sentencing
guidelines, notice is required before it is imposed, so that
counsel and the defendant will have the opportunity to
address personally its appropriateness.” United States v. Wise,
391 F.3d 1027, 1033 (9th Cir. 2004). The district court has
discretion as to the form and timing of the notice, and either
advanced written notice or oral notice at the sentencing hear-
ing may be sufficient, depending on the circumstances. Id.
However, the district court will be deemed to have provided
no notice when it announces the sentence and conditions of
supervised release and only afterwards provides defendant’s
counsel an opportunity to comment. Id. (“It is not enough
notice, however, first to impose the sentence, and then to
invite counsel to comment, at least where counsel objects as
occurred here. That is no notice at all.”).

   [7] The government concedes a remand is necessary
because the district court failed to provide Cope and his coun-
sel with notice of the special conditions requiring Cope, as
6340                     UNITED STATES v. COPE
part of his sex offender treatment program, to take all pre-
scribed medications and to submit to plethysmograph, poly-
graph, and Abel testing. Because these conditions of
supervised release are not contemplated by the Sentencing
Guidelines,4 the district court was required to provide notice
before imposing them. Although the district court notified
Cope that it would likely impose a sex offender treatment
condition, the court gave no indication the treatment condition
would involve the possibility of forced medication or plethys-
mograph, polygraph, and Abel testing. Cope’s attorney duly
objected to these conditions after the district court read the
sentence. Accordingly, we must vacate Cope’s sentence and
remand to the district court to permit the parties to address
whether these special conditions of supervised release are
appropriate. See Wise, 391 F.3d at 1033-34.

                                     B

   Cope argues that a remand is also necessary because the
district court did not provide a thorough discussion, on the
record, of why it was necessary to impose special conditions
of supervised release requiring Cope to submit to penile
plethysmograph testing and to “take all prescribed medica-
tion.” In United States v. Williams, we recognized that a con-
dition of supervised release “compelling a person to take
antipsychotic medication is an especially grave infringement
of liberty,” such that the usual rule that a district court need
   4
     The Guidelines do list (1) the mandatory condition that a defendant
convicted of a sexual offense must report his residential address to his pro-
bation officer and register as a sex offender, U.S.S.G. § 5D1.3(a)(7) (Nov.
2002), and (2) the recommended special condition that a defendant con-
victed of a sexual offense must participate in a sexual offender treatment
program, id. § 5D1.3(d)(7). The Guidelines are silent, however, as to any
of the testing or medication requirements the district court included as part
of Cope’s treatment program. This case is therefore distinguishable from
United States v. Lopez, where we noted that the Guidelines specifically
contemplated participation in a mental health program. 258 F.3d 1053,
1055-56 (9th Cir. 2001).
                     UNITED STATES v. COPE                   6341
not articulate its reasons for imposing supervised release con-
ditions does not apply. 356 F.3d at 1055. Instead, where
forced antipsychotic medication is concerned, “a thorough
inquiry is required before a court” may include it as a condi-
tion of supervised release. Id. This inquiry requires the district
court to “make an explicit finding on the record that the con-
dition ‘involves no greater deprivation of liberty than is rea-
sonably necessary.’ ” Id. at 1057 (quoting 18 U.S.C.
§ 3583(d)(2)). In addition, the parties must develop
“medically-informed records,” id. at 1056, to permit the dis-
trict court to make “on-the-record, medically-grounded find-
ings that court-ordered medication is necessary to accomplish
one or more of the factors listed in § 3583(d)(1),” id. at 1057.
Those factors include the nature of the crime, the history and
characteristics of the defendant, and the need to encourage
deterrence, protect the public, and provide the defendant with
rehabilitative services. 18 U.S.C. § 3553(a)(1), (a)(2)(B),
(a)(2)(C) & (a)(2)(D).

   In Weber, we extended the Williams rule to conditions
requiring those on supervised release to submit to penile
plethysmograph testing as part of their sex offender treatment.
451 F.3d at 568-69. We explained that whenever a condition
“implicates a particularly significant liberty interest of the
defendant,” the district court must articulate, based on evi-
dence in the record, why the condition “is necessary to
accomplish one or more of the factors listed in § 3583(d)(1)
and involves no greater deprivation of liberty than is reason-
ably necessary.” Id. at 561 (quoting Williams, 356 F.3d at
1057) (internal quotation marks omitted). When making these
heightened findings in the context of plethysmograph testing
specifically, the district court must consider whether the test-
ing is sufficiently likely to yield useful results “given a defen-
dant’s specific characteristics,” despite the known flaws and
intrusiveness of plethysmograph testing, as well as explain
why the many less-intrusive alternatives to plethysmograph
testing are not adequate. Id. at 567-68; see also id. at 569
(reiterating the need for evidence about the particular charac-
6342                 UNITED STATES v. COPE
teristics and circumstances of the defendant). We also clari-
fied that the government bears the burden of demonstrating
why the condition meets the requirements of 18 U.S.C.
§ 3583(d)(1)-(2). Id. at 558.

   Here, the government correctly concedes that we must
remand this case back to the district court because it did not
articulate, on the record, the necessary Weber findings with
regard to the condition requiring Cope to submit to plethys-
mograph testing. The government contends, however, that the
heightened requirements of Williams and Weber do not apply
to the condition requiring Cope to “take all prescribed medi-
cation.” It is true that Williams addressed only antipsychotic
medication, rather than a condition pertaining to forced medi-
cation of any kind. Antipsychotic medication, as the Williams
court pointed out, has received a great deal of attention from
this court and the Supreme Court as a particularly intrusive
category of drug that alters mental processes, affects behavior
and demeanor, and “interferes with a person’s self-
autonomy,” in addition to subjecting patients to serious side
effects. Williams, 356 F.3d at 1053-55; see also Riggins v.
Nevada, 504 U.S. 127 (1992); Washington v. Harper, 494
U.S. 210 (1990); Kulas v. Valdez, 159 F.3d 453 (9th Cir.
1998). That said, we must read Williams in conjunction with
Weber, where we expanded the Williams requirements to
plethysmograph testing and suggested that a district court
should make the heightened Williams findings before impos-
ing any condition that “implicates a particularly significant
liberty interest of the defendant.” Weber, 451 F.3d at 561.

   [8] There is nothing in Williams and Weber that would sug-
gest that the holdings were limited to the treatments at issue.
To the contrary, both decisions imply that the requirement of
special findings applies to any imposed treatment or medica-
tion that implicates a particularly significant liberty interest.
Accordingly, where, as here, a district court orders a defen-
dant to take “any” or “all” medication prescribed by medical
or other treatment personnel during his term of supervised
                         UNITED STATES v. COPE                         6343
release without making heightened Williams findings, this all-
encompassing medication condition must necessarily be
understood as limited to those medications that do not impli-
cate a particularly significant liberty interest of the defendant.
If the government wishes to impose upon a defendant a condi-
tion relating to a particular medication likely to infringe upon
significant liberty interests, it must bring the issue to the
attention of the district court, where it bears the burden of
demonstrating why the specific medication condition “is nec-
essary to accomplish one or more of the factors listed in
§ 3583(d)(1) and involves no greater deprivation of liberty
than is reasonably necessary.” Weber, 451 F.3d at 561 (inter-
nal quotation marks omitted). After the parties have devel-
oped the necessary “medically-informed records,” Williams,
356 F.3d at 1056, the district court must make “on-the-record,
medically-grounded findings that court-ordered medication is
necessary to accomplish one or more of the factors listed in
§ 3583(d)(1),” id. at 1057, and “that the condition ‘involves
no greater deprivation of liberty than is reasonably neces-
sary,’ ” id. (quoting 18 U.S.C. § 3583(d)(2)).5
  5
    In this context of sexual offender treatment, there are at least two
examples of medication that would implicate particularly significant lib-
erty interests such that the district court must make the necessary Williams
and Weber findings before Cope may be required to take them as part of
his treatment. The first, as we have already held, is any antipsychotic med-
ication. Williams, 356 F.3d at 1054-57. Cope also raises the possibility
that he could be ordered to undergo so-called “chemical castration,” the
taking of hormonal drugs to reduce his sex drive and cause temporary
impotence. We have no doubt that chemical castration would, if prescribed
against the will of a defendant on supervised release, implicate a particu-
larly significant liberty interest. Like antispychotic medication, chemical
castration interferes with mental processes and alters behavior. See, e.g.,
People v. Gauntlett, 352 N.W.2d 310, 314-16 (Mich. Ct. App. 1984); John
F. Stinneford, Incapacitation Through Maiming: Chemical Castration, the
Eighth Amendment, and the Denial of Human Dignity, 3 St. Thomas L.J.
559 (2006). It may also cause serious side effects, such as cancer and
depression. Gauntlett, 352 N.W.2d at 315; Physician’s Desk Reference
2624 (61st ed., 2007) (discussing Depo-Provera, a hormonal drug used for
chemical castration). As a result, chemical castration is certainly as intru-
6344                    UNITED STATES v. COPE
   [9] Given these considerations, we remand this case to the
district court to make findings on the record in accordance
with Weber, 451 F.3d at 567-69, before imposing the plethys-
mograph testing condition. We also remand to permit the dis-
trict court to make the necessary Williams and Weber findings
with regard to the condition requiring Cope to “take all pre-
scribed medication,” insofar as that condition may require
Cope to take medication that implicates a particularly signifi-
cant liberty interest.

                                   VI

   Cope also attacks the medication condition on the ground
that it infringes his procedural due process rights and is over-
broad. Under normal circumstances, a district court is not
required to “articulate on the record at sentencing the reasons
for imposing each condition.” United States v. Rearden, 349
F.3d 608, 619 (9th Cir. 2003); see also Williams, 356 F.3d at
1055. Cope’s due process argument is foreclosed by Williams
and Weber, which require additional process only when a
forced medication condition “implicates a particularly signifi-
cant liberty interest.” Weber, 451 F.3d at 561. The remand in
light of Williams and Weber, discussed above, will provide
Cope with all the process he is due.

   [10] We agree with Cope, however, that the requirement

sive as antipsychotic medication or penile plethysmograph testing. See
Weber, 451 F.3d at 561-64; Williams, 356 F.3d at 1054. In fact, chemical
castration may be found at the extreme end of the spectrum of intrusive
medications and procedures, and there may well be other conditions of
supervised release that qualify for Williams and Weber findings without
reaching that level of intrusion. We do not doubt that there will be other
types of medication or procedures designed to rehabilitate or deter, either
extant or not yet in existence, which, if forced upon a defendant as a con-
dition of supervised release, would implicate particularly significant lib-
erty interests. Cf., e.g., Anthony Burgess, A Clockwork Orange (W. W.
Norton & Co. 1962).
                        UNITED STATES v. COPE                        6345
that he “shall take all prescribed medication” is overbroad
insofar as it is not clearly limited to medications that are rea-
sonably related to sex offender treatment. Congress has stated
that special conditions of supervised release must be “reason-
ably related to the factors set forth in section 3553(a)(1),
(a)(2)(B), (a)(2)(C), and (a)(2)(D).” 18 U.S.C. § 3583(d)(1).
Those factors are “the nature and circumstances of the offense
and the history and characteristics of the defendant,” id.
§ 3553(a)(1), “the need . . . to afford adequate deterrence to
criminal conduct,” id. § 3553(a)(2)(B), “the need . . . to pro-
tect the public from further crimes of the defendant,” id.
§ 3553(a)(2)(C), and “the need . . . to provide the defendant
with needed educational or vocational training, medical care,
or other correctional treatment in the most effective manner,”
id. § 3553(a)(2)(D). Each of these factors points primarily to
the underlying sex offense committed by Cope and the result-
ing need for treatment and deterrence. In accordance with the
congressional intent, any medication Cope is required to take
as a condition of his supervised release must be reasonably
related to his treatment as a sex offender. Indeed, were the
rule otherwise, a person on supervised release could arguably
violate the terms of his release by neglecting to take pre-
scribed cold medications. Therefore, we hold that any medica-
tion condition that the district court imposes on remand must
be limited to medications reasonably related to Cope’s treat-
ment as a sex offender.6

                                   VII

   [11] Cope also argues that the sex offender treatment con-
dition requiring him to submit to plethysmograph, Abel, and
polygraph testing, as well as to inpatient treatment, is over-
  6
    Because the parties do not raise it, we do not reach the question
whether the medication condition, in permitting treatment personnel and
the probation officer to determine which medications Cope will be
required to take, is an improper delegation of authority. See United States
v. Stephens, 424 F.3d 876, 880-82 & n.2 (9th Cir. 2005).
6346                    UNITED STATES v. COPE
broad. Cope cites no authority for this proposition, and we
hold that the district court did not abuse its broad discretion
in setting these conditions of supervised release. Williams,
356 F.3d at 1052; United States v. Bee, 162 F.3d 1232, 1234
(9th Cir. 1998). The district court’s order requiring compre-
hensive sex offender treatment is reasonably related to Cope’s
history as a recidivist sex offender, 18 U.S.C. § 3553(a)(1),
the need to protect the public from potential future sex crimes,
id. § 3553(a)(2)(C), the need to deter Cope from committing
such crimes, id. § 3553(a)(2)(B), and Cope’s need for correc-
tional treatment, id. § 3553(a)(2)(D). See 18 U.S.C.
§ 3583(d)(1). In addition, the condition does not involve a
greater deprivation of liberty than is reasonably necessary for
these purposes, id. § 3583(d)(2),7 and is not contrary to any
policy statements issued by the Sentencing Commission, id.
§ 3583(d)(3); see United States v. Fellows, 157 F.3d 1197,
1203-04 (9th Cir. 1998) (rejecting an overbreadth challenge to
aspects of a supervised release condition relating to sex
offender treatment).

                                   VIII

   Finally, we address whether the special condition of Cope’s
supervised release prohibiting him from possessing “any
materials . . . depicting and/or describing child pornography”
is overbroad. Cope contends this condition is overbroad
because it exposes him to incarceration for possession of oth-
erwise protected materials “describing” child pornography,
such as statutes, caselaw, and Cope’s own writings as part of
his sex offender treatment. Cope did not object to this condi-
tion below, so we review for plain error. United States v.
  7
    We, of course, leave open the question whether the plethysmograph
testing requirement is reasonably related to the appropriate § 3553(a) fac-
tors and “involves no greater deprivation of liberty than is reasonably nec-
essary.” 18 U.S.C. § 3583(d)(1)-(2). As discussed above, the district court
must make this determination on the record in accordance with Weber,
451 F.3d at 561, 567-70.
                      UNITED STATES v. COPE                    6347
Olano, 507 U.S. 725, 731-36 (1993). In order for us to reverse
the district court under this standard of review, we must find
“an ‘error’ that is ‘plain’ and that ‘affects substantial rights.’ ”
United States v. Minore, 292 F.3d 1109, 1117 (9th Cir. 2002)
(quoting Olano, 507 U.S. at 732). “If those requirements are
met, we will exercise our discretion to correct the error only
if it ‘seriously affects the fairness, integrity or public reputa-
tion of judicial proceedings.’ ” Id. (quoting Olano, 507 U.S.
at 732). The condition constitutes plain error for two reasons.

   [12] First, the condition straightforwardly applies to Cope’s
own presentence report, as well as copies of statutes and cases
that Cope might need were he to bring a collateral challenge
to an aspect of his sentence once he is released from prison.
See, e.g., 18 U.S.C. § 2252A(a)(3)(B) (defining child pornog-
raphy); Rearden, 349 F.3d at 612, 615 (describing particular
images of child pornography). The government effectively
acknowledges that the condition could interfere with Cope’s
ability to bring a collateral attack by suggesting “that the
panel consider adding language to make it clear that defen-
dant can review legal materials in the possession of his lawyer
or probation officer.” Resp. to Pet. for Reh’g 6-7. While we
agree that an amendment to the condition would cure this par-
ticular problem, it is the district court that must alter the con-
ditions of a defendant’s supervised release. See United States
v. Miller, 205 F.3d 1098 (9th Cir. 2000); 18 U.S.C. § 3583(e).
If a condition is to be amended, we must order the district
court to do so on remand. However, the government’s sug-
gested amendment is insufficient to protect Cope’s right to
prepare a collateral attack. Cope is indigent and has no statu-
tory or constitutional right to counsel on collateral attack;
thus, requiring him to obtain counsel, or even the assistance
of his probation officer, in order to formulate a collateral
attack is unduly restrictive. Therefore, we direct the district
court on remand to amend this condition to clarify that Cope
may possess materials necessary to a collateral attack for the
purposes of preparing a collateral attack.
6348                 UNITED STATES v. COPE
   [13] The second error in the condition is that because it
bars Cope from possessing “writings . . . describing child por-
nography,” it would, by its plain language, apply to journal-
writing or the writing of a “sexual autobiography,” see United
States v. Antelope, 395 F.3d 1128, 1135 (9th Cir. 2005), that
may be required elements of Cope’s sex offender treatment.
We cannot, as the government urges, assume this condition
will be construed so as not to put Cope to the choice of violat-
ing it and violating another condition of his supervised
release, such as the requirement that he “abide by all rules,
requirements, and conditions of” a sex offender treatment pro-
gram. “We review the language of the condition as it is writ-
ten and cannot assume, as the government seems to suggest,”
that it will be interpreted contrary to its plain language.
United States v. Sales, 476 F.3d 732, 737 (9th Cir. 2007).
Accordingly, we also direct the district court on remand to
amend the condition to clarify that Cope may keep journals or
participate in the writing of a “sexual autobiography,” if
required by his sex offender treatment.

   If so amended, this condition of Cope’s supervised release
will readily pass constitutional muster. We have already
rejected an overbreadth challenge to a similar condition pro-
hibiting a defendant from possessing “any materials depicting
sexually explicit conduct as defined by 18 U.S.C. § 2256(2).”
Rearden, 349 F.3d at 619. We upheld the restriction because
“[a] defendant’s right to free speech may be abridged to effec-
tively address [his] sexual deviance problem,” id. (internal
quotation marks omitted) (second alteration in original), and
because the restriction furthered the goals of rehabilitation
and protecting the public, id. at 620. Given Cope’s long his-
tory of sexual attraction to children, the same reasoning
applies here. However, the condition may not interfere with
Cope’s ability to formulate a collateral attack if he so chooses,
nor may the condition create a conflict with other conditions
of his supervised release. Cope “cannot be left to guess about
the intended meaning of the terms of his supervised release.”
Sales, 476 F.3d at 737.
                    UNITED STATES v. COPE                  6349
                              IX

   In conclusion, although we uphold the district court’s sen-
tence of a lifetime term of supervised release, we vacate the
sentence and remand to permit the district court: (1) to pro-
vide notice to the parties of any special condition of super-
vised release not contemplated by the Sentencing Guidelines;
(2) to articulate specific, medically informed findings on the
record regarding the need for Cope to undergo plethysmo-
graph testing and take medications that implicate particularly
significant liberty interests; (3) to clarify that any condition
requiring Cope to take all prescribed medications is limited to
those medications reasonably related to sex offender treat-
ment; and (4) to clarify that the condition prohibiting Cope
from possessing materials describing child pornography does
not apply to materials necessary to, and used for, a collateral
attack, or to materials prepared or used for the purposes of his
court-mandated sex offender treatment.

 AFFIRMED IN PART; REVERSED IN PART; SEN-
TENCE VACATED AND REMANDED.
