Processing code for Trek surface lighting data

Does anyone have a resource to share or python script to process surface lighting data from Moon trek to generate a plot showing continuous lighting and darkness periods at location? Thank you.