<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_body(self, name, label=None, agent=None, ip_addresses=None, metadata=None):
 """ Used to create the dict required to create various resources. Accepts either 'label' or 'name' as the keyword parameter for the label attribute for entities. """

        label = label or name
        if ip_addresses is not None:
            body = {"label": label}
            if ip_addresses:
                body["ip_addresses"] = ip_addresses
            if agent:
                body["agent_id"] = utils.get_id(agent)
            if metadata:
                body["metadata"] = metadata
        return body