Get components from a component definition in order

def get_components(self, uri):
        """
        Get components from a component definition in order
        """
        try:
            component_definition = self._components[uri]
        except KeyError:
            return False

        sorted_sequences = sorted(component_definition.sequence_annotations,
                                  key=attrgetter('first_location'))
        return [c.component for c in sorted_sequences]