given keywordtrainwe can encode the message encoded in python as follows repeat the keyword and message together such that it is easy to map letters from one to the othere for each letter in the plain textfind the row that begins with that letter in the table find the column with the letter associated with the keyword letter for the chosen plaintext letter the encoded character is at the intersection of this row and column for examplethe row starting with intersects the column starting with at the character sothe first letter in the ciphertext is the row starting with intersects the column starting with at the character eleading to the ciphertext xe intersects at cand intersects at and map to while and map to the full encoded message is xecwqxuivcrkhwa decoding basically follows the opposite procedure firstfind the row with the character for the shared keyword (the row)then find the location in that row where the encoded character (the xis located the plaintext character is at the top of the column for that row (the eimplementing it our program will need an encode method that takes keyword and plaintext and returns the ciphertextand decode method that accepts keyword and ciphertext and returns the original message but rather than just writing those methodslet' follow test-driven development strategy we'll be using py test for our unit testing we need an encode methodand we know what it has to dolet' write test for that method firstdef test_encode()cipher vigenerecipher("train"encoded cipher encode("encodedinpython"assert encoded ="xecwqxuivcrkhwa