def __getitem__(self, attribute):
<EOL>if attribute not in self:<EOL><INDENT>raise AttributeNotFound(attribute)<EOL><DEDENT>if self.allow_all and attribute not in self.attributes:<EOL><INDENT>self.attributes[attribute] = self.Attribute(attribute)<EOL><DEDENT>return self.attributes[attribute]<EOL>
Get the ``Attribute`` instance for the given attribute name.

        Arguments
        ---------
        attribute : string
            The name of the attribute we want.

        Returns
        -------
        Attribute
            The ``Attribute`` instance that matches the given attribute.

        Raises
        ------
        dataql.solvers.exceptions.AttributeNotFound
            If the given attribute is not available.

        Example
        -------

        >>> a = Attributes('foo', '_bar', Attribute(name="qux"))
        >>> a['foo']
        <Attribute 'foo'>
        >>> a = Attributes('foo', '_bar', allow_all=True)
        >>> a['qux']
        <Attribute 'qux'>
        >>> a['_baz']
        Traceback (most recent call last):
        dataql.solvers.exceptions.AttributeNotFound: `_baz` is not an allowed attribute