# Path: falsy/loader/func.py
# def load(function_name):
#     if not function_name:
#         return None
# 
#     if function_name in func_map.keys():
#         return func_map[function_name]
# 
#     module_name, attr_path = function_name.rsplit('.', 1)
#     module = None
#     last_import_error = None
# 
#     while not module:
# 
#         try:
#             module = importlib.import_module(module_name)
#         except ImportError as import_error:
#             last_import_error = import_error
#             if '.' in module_name:
#                 module_name, attr_path1 = module_name.rsplit('.', 1)
#                 attr_path = '{0}.{1}'.format(attr_path1, attr_path)
#             else:
#                 raise
#     try:
#         function = deep_getattr(module, attr_path)
#     except AttributeError:
#         if last_import_error:
#             raise last_import_error
#         else:
#             raise
#     func_map[str(function_name)] = function
#     return function


import json
import re
import pycurl
import uuid
from falsy.loader.func import load
        # Lowercase name here.
        name = name.lower()

        # Now we can actually record the header name and value.
        if name in headers['content'][count]:
            headers['content'][count][name].append(value)
        else:
            headers['content'][count][name] = [value]

    def write_function(buf):
        size = data_buf.getbuffer().nbytes
        if size < 4096000:
            data_buf.write(buf)
            return len(buf)
        return 0

    url = p.get('url')
    c._raw_url = url
    c._raw_id = p.get('id', str(uuid.uuid1()))
    c._raw_post_func = p.get('post_func')
    c._raw_payload = p
    c.setopt(pycurl.URL, url.encode('utf-8'))
    c.setopt(pycurl.FOLLOWLOCATION, p.get('followlocation', 1))
    c.setopt(pycurl.MAXREDIRS, p.get('maxredirs', 5))

    # c.setopt(pycurl.WRITEHEADER, header_buf)
    headerfunction = p.get('headerfunction')
    if headerfunction is None:
        c.setopt(pycurl.HEADERFUNCTION, header_function)
    else:

# Path: falsy/loader/func.py
# def load(function_name):
#     if not function_name:
#         return None
# 
#     if function_name in func_map.keys():
#         return func_map[function_name]
# 
#     module_name, attr_path = function_name.rsplit('.', 1)
#     module = None
#     last_import_error = None
# 
#     while not module:
# 
#         try:
#             module = importlib.import_module(module_name)
#         except ImportError as import_error:
#             last_import_error = import_error
#             if '.' in module_name:
#                 module_name, attr_path1 = module_name.rsplit('.', 1)
#                 attr_path = '{0}.{1}'.format(attr_path1, attr_path)
#             else:
#                 raise
#     try:
#         function = deep_getattr(module, attr_path)
#     except AttributeError:
#         if last_import_error:
#             raise last_import_error
#         else:
#             raise
#     func_map[str(function_name)] = function
#     return function


# Path: falsy/netboy/utils.py
import json
import re
import pycurl
import uuid
from falsy.loader.func import load

        # Lowercase name here.
        name = name.lower()

        # Now we can actually record the header name and value.
        if name in headers['content'][count]:
            headers['content'][count][name].append(value)
        else:
            headers['content'][count][name] = [value]

    def write_function(buf):
        size = data_buf.getbuffer().nbytes
        if size < 4096000:
            data_buf.write(buf)
            return len(buf)
        return 0

    url = p.get('url')
    c._raw_url = url
    c._raw_id = p.get('id', str(uuid.uuid1()))
    c._raw_post_func = p.get('post_func')
    c._raw_payload = p
    c.setopt(pycurl.URL, url.encode('utf-8'))
    c.setopt(pycurl.FOLLOWLOCATION, p.get('followlocation', 1))
    c.setopt(pycurl.MAXREDIRS, p.get('maxredirs', 5))

    # c.setopt(pycurl.WRITEHEADER, header_buf)
    headerfunction = p.get('headerfunction')
    if headerfunction is None:
        c.setopt(pycurl.HEADERFUNCTION, header_function)
    else:

        c.setopt(pycurl.HEADERFUNCTION, load(headerfunction))