<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def import_metadata(self, elements):
 """Import information from GPX metadata. Args: elements (etree.Element):
 GPX metadata subtree """

        metadata_elem = lambda name: etree.QName(GPX_NS, name)

        for child in elements.getchildren():
            tag_ns, tag_name = child.tag[1:].split('}')
            if not tag_ns == GPX_NS:
                continue
            if tag_name in ('name', 'desc', 'keywords'):
                setattr(self, tag_name, child.text)
            elif tag_name == 'time':
                self.time = utils.Timestamp.parse_isoformat(child.text)
            elif tag_name == 'author':
                self.author['name'] = child.findtext(metadata_elem('name'))
                aemail = child.find(metadata_elem('email'))
                if aemail:
                    self.author['email'] = '%s@%s' % (aemail.get('id'),
                                                      aemail.get('domain'))
                self.author['link'] = child.findtext(metadata_elem('link'))
            elif tag_name == 'bounds':
                self.bounds = {
                    'minlat': child.get('minlat'),
                    'maxlat': child.get('maxlat'),
                    'minlon': child.get('minlon'),
                    'maxlon': child.get('maxlon'),
                }
            elif tag_name == 'extensions':
                self.extensions = child.getchildren()
            elif tag_name == 'copyright':
                if child.get('author'):
                    self.copyright['name'] = child.get('author')
                self.copyright['year'] = child.findtext(metadata_elem('year'))
                self.copyright['license'] = child.findtext(metadata_elem('license'))
            elif tag_name == 'link':
                link = {
                    'href': child.get('href'),
                    'type': child.findtext(metadata_elem('type')),
                    'text': child.findtext(metadata_elem('text')),
                }
                self.link.append(link)