<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def all(self, target=None, include_global=True):
 """ Get a dictionary of all aliases and their options. :param target: Include aliases for this specific field, model or app (optional). :param include_global: Include all non target-specific aliases (default ``True``). For example:: {'small': {'size': (100, 100)}, 'large': {'size': (400, 400)}} """

        aliases = {}
        for target_part in self._get_targets(target, include_global):
            aliases.update(self._aliases.get(target_part, {}))
        return aliases