def _array_length(type_str: str) ->int:
    """Returns the length of a fixed array, or 0"""
    if '[' not in type_str:
        return 0
    num = type_str[type_str.rindex('[') + 1:type_str.rindex(']')]
    if num == '':
        return 0
    length = int(num)
    if length == 1:
        raise NotImplementedError('1-length arrays? Really?')
    return length
