# Buggy code
def _alexa_wide_gamut_rgb_transfer_function(
    value, firmware="SUP 3.x", method="Linear Scene Exposure Factor", EI=800
):
    """
    Defines the *ALEXA Wide Gamut* value colourspace transfer function.

    Parameters
    ----------
    value : numeric
        value.
    firmware : unicode, optional
        {'SUP 3.x', 'SUP 2.x'}
        Alexa firmware version.
    method : unicode, optional
        {'Linear Scene Exposure Factor', 'Normalised Sensor Signal'}
        Conversion method.
    EI : int,  optional
        Ei.

    Returns
    -------
    numeric
        Companded value.
    """

    cut, a, b, c, d, e, f, _ = (
        ALEXA_LOG_C_CURVE_CONVERSION_DATA.get(firmware).get(method).get(EI)
    )

    return c * np.log10(a * value + b) + d if value > cut else e * value + f


# Traceback (PicklingError)
---------------------------------------------------------------------------
PicklingError                             Traceback (most recent call last)
<ipython-input-1-6796e1d3ddfb> in <module>()
61 # multi_process_colourspace_volume_MonteCarlo(colour.ADOBE_RGB_1998_COLOURSPACE, 10e3)
62 import pickle
---> 63 pickle.dumps(colour.ADOBE_RGB_1998_COLOURSPACE)

/home/vagrant/anaconda/envs/python2.7/lib/python2.7/pickle.pyc in dumps(obj, protocol)
1372 def dumps(obj, protocol=None):
1373     file = StringIO()
-> 1374     Pickler(file, protocol).dump(obj)
1375     return file.getvalue()
1376

/home/vagrant/anaconda/envs/python2.7/lib/python2.7/pickle.pyc in dump(self, obj)
222         if self.proto >= 2:
223             self.write(PROTO + chr(self.proto))
--> 224         self.save(obj)
225         self.write(STOP)
226

/home/vagrant/anaconda/envs/python2.7/lib/python2.7/pickle.pyc in save(self, obj)
329
330         # Save the reduce() output and finally memoize the object
--> 331         self.save_reduce(obj=obj, *rv)
332
333     def persistent_id(self, obj):

/home/vagrant/anaconda/envs/python2.7/lib/python2.7/pickle.pyc in save_reduce(self, func, args, state, listitems, dictitems, obj)
417
418         if state is not None:
--> 419             save(state)
420             write(BUILD)
421

/home/vagrant/anaconda/envs/python2.7/lib/python2.7/pickle.pyc in save(self, obj)
284         f = self.dispatch.get(t)
285         if f:
--> 286             f(self, obj) # Call unbound method with explicit self
287             return
288

/home/vagrant/anaconda/envs/python2.7/lib/python2.7/pickle.pyc in save_dict(self, obj)
647
648         self.memoize(obj)
--> 649         self._batch_setitems(obj.iteritems())
650
651     dispatch[DictionaryType] = save_dict

/home/vagrant/anaconda/envs/python2.7/lib/python2.7/pickle.pyc in _batch_setitems(self, items)
661             for k, v in items:
662                 save(k)
--> 663                 save(v)
664                 write(SETITEM)
665             return

/home/vagrant/anaconda/envs/python2.7/lib/python2.7/pickle.pyc in save(self, obj)
284         f = self.dispatch.get(t)
285         if f:
--> 286             f(self, obj) # Call unbound method with explicit self
287             return
288

/home/vagrant/anaconda/envs/python2.7/lib/python2.7/pickle.pyc in save_global(self, obj, name, pack)
746             raise PicklingError(
747                 "Can't pickle %r: it's not found as %s.%s" %
--> 748                 (obj, module, name))
749         else:
750             if klass is not obj:

PicklingError: Can't pickle <function <lambda> at 0x7faae408dc80>: it's not found as colour.models.dataset.adobe_rgb_1998.<lambda>

# Fixed code
def _alexa_wide_gamut_rgb_transfer_function(
    value, firmware="SUP 3.x", method="Linear Scene Exposure Factor", EI=800
):
    """
    Defines the *ALEXA Wide Gamut* colourspace transfer function.

    Parameters
    ----------
    value : numeric
        value.
    firmware : unicode, optional
        {'SUP 3.x', 'SUP 2.x'}
        Alexa firmware version.
    method : unicode, optional
        {'Linear Scene Exposure Factor', 'Normalised Sensor Signal'}
        Conversion method.
    EI : int,  optional
        Ei.

    Returns
    -------
    numeric
        Companded value.
    """

    cut, a, b, c, d, e, f, _ = (
        ALEXA_LOG_C_CURVE_CONVERSION_DATA.get(firmware).get(method).get(EI)
    )

    return c * np.log10(a * value + b) + d if value > cut else e * value + f