@staticmethod
def format_session(d, intify=True):
    """ Given a array d [1, 2] or [1] it turns it into a dict with keys start, end """
    d = tuple(map(lambda x: int(x) if intify and x.isdigit() else x, filter
        (lambda x: len(x.strip()) > 0, d)))
    end = d[0] if len(d) < 2 else d[1]
    return {'start': d[0], 'end': end}
