<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_loadfile(entities, f):
 """Create payload and save to file."""

        with open(f, 'w') as out:
            out.write(Entity.create_payload(entities))