<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def vofile(filename, **kwargs):
 """ Open and return a handle on a VOSpace data connection @param filename: @param kwargs: @return: """

    basename = os.path.basename(filename)
    if os.access(basename, os.R_OK):
        return open(basename, 'r')
    kwargs['view'] = kwargs.get('view', 'data')
    return client.open(filename, **kwargs)