I am trying to flatten this JSON file where the columns for some record are of type struct while sometimes it is string. How do we flatten such a file in Spark using Pyt