def get_function_return(function):
    """
    Return a tuple with the type of the return value of the function
    and the item type (if type is an array)
    """
    return_type = getattr(function, 'doc_return_type', None)
    if not return_type:
        return None, None
    elif return_type != 'array':
        return return_type, None
    else:
        item_type = getattr(function, 'doc_return_item_type', 'string')
        return 'array', item_type