<commit_before>
import os
import requests
import logging
logger = logging.getLogger("dunya")

import conn
import docserver

COLLECTIONS = None

def set_collections(collections):
    """ Set a list of collections mbid to restrict the queries.
    You must call this before you can make any other calls, otherwise 
    they won't be restricted.

    Arguments:
        collections: list of collections mbids

    """
    global COLLECTIONS
    COLLECTIONS = collections

def _get_collections():
    extra_headers = None
    if COLLECTIONS:
        extra_headers = {}
        extra_headers['HTTP_DUNYA_COLLECTION'] = ','.join(collections)<commit_msg>Fixing bug on hindustani get_collection<commit_after>
import os
import requests
import logging
logger = logging.getLogger("dunya")

import conn
import docserver

COLLECTIONS = None

def set_collections(collections):
    """ Set a list of collections mbid to restrict the queries.
    You must call this before you can make any other calls, otherwise 
    they won't be restricted.

    Arguments:
        collections: list of collections mbids

    """
    global COLLECTIONS
    COLLECTIONS = collections

def _get_collections():
    extra_headers = None
    if COLLECTIONS:
        extra_headers = {}
        extra_headers['HTTP_DUNYA_COLLECTION'] = ','.join(COLLECTIONS)
{'fraction_non_alphanumeric': 0.06818181818181818, 'fraction_numerical': 0.0, 'mean_word_length': 3.602787456445993, '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': '1051078', 'n_tokens_mistral': 386, 'n_tokens_neox': 365, 'n_words': 127}