def unpickle_context(content, pattern=None):
    pickle = get_pickle()
    if pattern is None:
        pattern = pickled_context_re
    match = pattern.search(content)
    if match:
        return pickle.loads(base64.standard_b64decode(match.group(1)))
    return None
Unpickle the context from the given content string or return None.
dataset/ETHPy150Open codysoyland/django-phased/phased/utils.py/unpickle_context