@classmethod
def closetab(cls):
    """
        (classmethod) espressomaker.Espresso.closetab()
        
        Closes the open tab that belongs to this kernel (if any).
        
        Returns:
            None.
        
        """
    status = cls()._status()
    try:
        cls()._closetab(pid=cls._temp_pid)
        print('[espressomaker] Espresso tab closed.')
    except AttributeError:
        if status[0] == 0:
            print(
                '[espressomaker] No "caffeinate" processes related to this kernel (nor system) were found.'
                )
        elif status[0] == 1:
            cls()._closetab(pid=status[1])
            print('[espressomaker] Espresso tab closed.')
        elif status[0] == 2:
            print(
                """[espressomaker] No "caffeinate" processes related to this kernel were found but there are other
"caffeinate" processes running on this machine. To kill all, run "Espresso.killall()"."""
                )
    except:
        print(
            'Unexpected error. If you still have any "caffeinate" processes open, run "Espresso.killall()".'
            )
    finally:
        cls._temp_pid = None
