<commit_before>try:
    from urllib2 import urlopen, quote
except:
    from urllib.request import urlopen, quote, Request

import json
import http.client as hc
from . import utils
from .bulk import VeneerRetriever
from .server_side import VeneerIronPython
from .utils import SearchableList,_stringToList
import pandas as pd
# Source
from . import extensions

PRINT_URLS=False
PRINT_ALL=False
PRINT_SCRIPTS=False

def name_time_series(result):
    '''
    Name the retrieved time series based on the full name of the time series (including variable and location)
    '''
    return result['TimeSeriesName']

def name_element_variable(result):
    element = result['NetworkElement']
    variable = result['RecordingVariable'].split(' - ')[-1]
    if variable=='Flow':
        variable = result['RecordingElement'].split(' - ')[-1]
    return '%s:%s'%(element,variable)

def name_for_variable(result):
    '''
    Name the retrieved time series based on the variable only.

    Useful when retrieving multiple time series from one network location.
    '''
    return result['RecordingVariable']

def name_for_location(result):
    '''
    Name the retrieved time series based on the network location only.

    Useful when retrieving the same variable from multiple locations.
    '''
    return result['NetworkElement']


def log(text):<commit_msg>Fix for naming time series when retrieving multiples<commit_after>try:
    from urllib2 import urlopen, quote
except:
    from urllib.request import urlopen, quote, Request

import json
import http.client as hc
from . import utils
from .bulk import VeneerRetriever
from .server_side import VeneerIronPython
from .utils import SearchableList,_stringToList
import pandas as pd
# Source
from . import extensions

PRINT_URLS=False
PRINT_ALL=False
PRINT_SCRIPTS=False

def name_time_series(result):
    '''
    Name the retrieved time series based on the full name of the time series (including variable and location)
    '''
    return result.get('TimeSeriesName',result.get('Name','%s/%s/%s'%(result['NetworkElement'],result['RecordingElement'],result['RecordingVariable'])))

def name_element_variable(result):
    element = result['NetworkElement']
    variable = result['RecordingVariable'].split(' - ')[-1]
    if variable=='Flow':
        variable = result['RecordingElement'].split(' - ')[-1]
    return '%s:%s'%(element,variable)

def name_for_variable(result):
    '''
    Name the retrieved time series based on the variable only.

    Useful when retrieving multiple time series from one network location.
    '''
    return result['RecordingVariable']

def name_for_location(result):
    '''
    Name the retrieved time series based on the network location only.

    Useful when retrieving the same variable from multiple locations.
    '''
    return result['NetworkElement']


def log(text):
{'fraction_non_alphanumeric': 0.09406809406809406, 'fraction_numerical': 0.002106002106002106, 'mean_word_length': 4.377358490566038, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3052496', 'n_tokens_mistral': 800, 'n_tokens_neox': 774, 'n_words': 268}