def _fetch_losc_data_file(url, *args, **kwargs):
cls = kwargs.pop('<STR_LIT>', TimeSeries)<EOL>cache = kwargs.pop('<STR_LIT>', None)<EOL>verbose = kwargs.pop('<STR_LIT>', False)<EOL>if url.endswith('<STR_LIT>'):<EOL><INDENT>ext = os.path.splitext(url[:-<NUM_LIT:3>])[-<NUM_LIT:1>]<EOL><DEDENT>else:<EOL><INDENT>ext = os.path.splitext(url)[-<NUM_LIT:1>]<EOL><DEDENT>if ext == '<STR_LIT>':<EOL><INDENT>kwargs.setdefault('<STR_LIT>', '<STR_LIT>')<EOL><DEDENT>elif ext == '<STR_LIT>':<EOL><INDENT>kwargs.setdefault('<STR_LIT>', '<STR_LIT>')<EOL><DEDENT>elif ext == '<STR_LIT>':<EOL><INDENT>kwargs.setdefault('<STR_LIT>', '<STR_LIT>')<EOL><DEDENT>with _download_file(url, cache, verbose=verbose) as rem:<EOL><INDENT>if ext == "<STR_LIT>" and (not args or args[<NUM_LIT:0>] is None):<EOL><INDENT>args = (_gwf_channel(rem, cls, kwargs.get("<STR_LIT>")),)<EOL><DEDENT>if verbose:<EOL><INDENT>print('<STR_LIT>', end='<STR_LIT:U+0020>')<EOL><DEDENT>try:<EOL><INDENT>series = cls.read(rem, *args, **kwargs)<EOL><DEDENT>except Exception as exc:<EOL><INDENT>if verbose:<EOL><INDENT>print('<STR_LIT>')<EOL><DEDENT>exc.args = ("<STR_LIT>"<EOL>% (url, str(exc)),)<EOL>raise<EOL><DEDENT>else:<EOL><INDENT>if ext == '<STR_LIT>' and isinstance(series, StateVector):<EOL><INDENT>try:<EOL><INDENT>bits = {}<EOL>for bit in str(series.unit).split():<EOL><INDENT>a, b = bit.split('<STR_LIT::>', <NUM_LIT:1>)<EOL>bits[int(a)] = b<EOL><DEDENT>series.bits = bits<EOL>series.override_unit('<STR_LIT>')<EOL><DEDENT>except (TypeError, ValueError):  <EOL><INDENT>pass<EOL><DEDENT><DEDENT>if verbose:<EOL><INDENT>print('<STR_LIT>')<EOL><DEDENT>return series<EOL><DEDENT><DEDENT>
Internal function for fetching a single LOSC file and returning a Series