<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def scramble_codelist(self, codelist):
 """Return random element from code list"""

        # TODO:  External code lists
        path = ".//{0}[@{1}='{2}']".format(E_ODM.CODELIST.value, A_ODM.OID.value, codelist)
        elem = self.metadata.find(path)
        codes = []
        for c in elem.iter(E_ODM.CODELIST_ITEM.value):
            codes.append(c.get(A_ODM.CODED_VALUE.value))
        for c in elem.iter(E_ODM.ENUMERATED_ITEM.value):
            codes.append(c.get(A_ODM.CODED_VALUE.value))

        return fake.random_element(codes)