code: def from_json(cls, data):
          
          # assign default values
          assert 'data_type' in data, 'Required keyword "data_type" is missing!'
          keys = ('data_type', 'unit', 'analysis_period', 'metadata')
          for key in keys:
              if key not in data:
                  data[key] = None
  
          data_type = DataTypeBase.from_json(data['data_type'])
          ap = AnalysisPeriod.from_json(data['analysis_period'])
          return cls(data_type, data['unit'], ap, data['metadata'])
docs: Create a header from a dictionary.
  
          Args:
              data: {
                  "data_type": {}, //Type of data (e.g. Temperature)
                  "unit": string,
                  "analysis_period": {} // A Ladybug AnalysisPeriod
                  "metadata": {}, // A dictionary of metadata
              }