<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def apply_defaults(self, row, tables_dict):
    "apply defaults to missing cols for a row that's being inserted"
    return [
      emergency_cast(colx, field_default(colx, self.name, tables_dict) if v is Missing else v)
      for colx,v in zip(self.fields,row)
    ]