def get_index(lang, index):
    """
    Given an integer index this function will return the proper string
    version of the index based on the language and other considerations

    Parameters
    ----------
    lang : str
        One of the supported languages, {'c', 'cuda', 'fortran', 'matlab'}
    index : int

    Returns
    -------
    str
        The string corresponding to the correct index to be formatted into the code

    """
    retval = None
    if lang in ['fortran', 'matlab']:
        return str(index + 1)
    if lang in ['c', 'cuda']:
        return str(index)
