Which section is this in, if any

def section(self, resources):
        """ Which section is this in, if any """

        section = [p for p in self.parents(resources) if p.rtype == 'section']
        if section:
            return section[0]
        return None