<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def _expand_sources(sources):
    '''
    Expands a user-provided specification of source files into a list of paths.
    '''
    if sources is None:
        return []
    if isinstance(sources, six.string_types):
        sources = [x.strip() for x in sources.split(',')]
    elif isinstance(sources, (float, six.integer_types)):
        sources = [six.text_type(sources)]
    return [path
            for source in sources
            for path in _glob(source)]