<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def maybe(value):
 """Wraps an object with a Maybe instance. Something("I'm a value") Nothing Testing for value: True False False True Simplifying IF statements: "I'm a value" "I'm a value" Traceback (most recent call last):
 NothingValueError: No such element 'value' 'value' Wrap around values from object's attributes: class Person(object):
 def __init__(name):
 self.eran = name eran = maybe(Person('eran')) Something('eran') Nothing 'no phone number' Something(12) Something(2) Something(8) And methods: 'value' 'unknwon' Enabled easily using NestedDictionaries without having to worry if a value is missing. For example lets assume we want to load some value from the following dictionary: nested_dict = maybe({ 'store': { 'name': 'MyStore', 'departments': { 'sales': { 'head_count': '10' } } } }) 'MyStore' Nothing 'No Address Specified' True [] '10' '0' """

    if isinstance(value, Maybe):
        return value

    if value is not None:
        return Something(value)

    return Nothing()