<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def getAttribute(self, attribute):
 """return requested attribute value or None """

        if type(attribute) in (list, tuple):
            if len(attribute) != 2:
                raise LookupError, 'To access attributes must use name or (namespace,name)'

            ns_dict = self.attributes.get(attribute[0])
            if ns_dict is None:
                return None

            return ns_dict.get(attribute[1])

        return self.attributes.get(attribute)