import pickle


def pickle_data(tdata):
    """
    Pickle the data for the client
    >>> pickle_data(b'\x80\x03X\n\x00\x00\x00Easy testsq\x00.')
    b'\x80\x03X\n\x00\x00\x00Easy testsq\x00.'
    >>> pickle_data("Easy tests")
    b'\x80\x03X\n\x00\x00\x00Easy testsq\x00.'
    """
    try:
        if isinstance(tdata, bytes): #Quick check if tdata is already bytes
            data = tdata
        else:
            data = pickle.dumps(tdata)
    except:
        data = False
    return data