<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_field(self, field, arg=None, value=None, extended=False, hidden=False, e_type=str, required=None):
 """Add a new field to the current ResourceBuilder. Keyword arguments: field -- field name arg -- name of the attribute name in arg object (argparse) value -- a default for this field, used for resource creation. extended -- If set to true, the current field will be display in extended list mode only. hidden -- If set to true, the current field won't be exposed as available keys. e_type -- field data type (default str):
 int, float, str required -- True if the current field is required for create and update methods """

        if required is None:
            required = self._required
        if arg is None:
            arg = re.sub('(?!^)([A-Z]+)', r'_\1', field).lower()
        self._fields[field] = {
            'field': field,
            'arg': arg,
            'value': value,
            'extended': extended,
            'required': required,
            'e_type': e_type,
            'hidden': hidden
        }