<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def encompasses(self, span):
 """ Returns true if the given span fits inside this one """

        if isinstance(span, list):
            return [sp for sp in span if self._encompasses(sp)]

        return self._encompasses(span)