def get_next_types(self, n=None):
if n > self.available():<EOL><INDENT>raise IllegalState('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>next_list = []<EOL>i = <NUM_LIT:0><EOL>while i < n:<EOL><INDENT>try:<EOL><INDENT>next_list.append(next(self))<EOL><DEDENT>except:  <EOL><INDENT>raise OperationFailed()<EOL><DEDENT>i += <NUM_LIT:1><EOL><DEDENT>return next_list<EOL><DEDENT>
Gets the next set of ``Types`` in this list.

        The specified amount must be less than or equal to the return
        from ``available()``.

        arg:    n (cardinal): the number of ``Type`` elements requested
                which must be less than or equal to ``available()``
        return: (osid.type.Type) - an array of ``Type`` elements.The
                length of the array is less than or equal to the number
                specified.
        raise:  IllegalState - no more elements available in this list
        raise:  OperationFailed - unable to complete request
        *compliance: mandatory -- This method must be implemented.*