<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get(self, item, default=None):
 """ Returns the value ``item`` from the host or hosts group variables. Arguments: item(``str``):
 The variable to get default(``any``):
 Return value if item not found """

        if hasattr(self, item):
            return getattr(self, item)
        try:
            return self.__getitem__(item)

        except KeyError:
            return default