human
I wrote the below code

    def _pull_field(js, spec):
        result = js
        if isinstance(spec, list):
            for field in spec:
                result = result[field]
        else:
            result = result[spec]
        return result
    if (isinstance(data, list) and (len(data) is 0)):
        return DataFrame()
    if isinstance(data, dict):
        data = [data]
    if (record_path is None):
        if any([isinstance(x, dict) for x in compat.itervalues(data[0])]):
            data = nested_to_record(data, sep=sep)
        return DataFrame(data)
    elif (not isinstance(record_path, list)):
        record_path = [record_path]
    if (meta is None):
        meta = []
    elif (not isinstance(meta, list)):
        meta = [meta]
    for (i, x) in enumerate(meta):
        if (not isinstance(x, list)):
            meta[i] = [x]
    records = []
    lengths = []
    meta_vals = defaultdict(list)
    if (not isinstance(sep, compat.string_types)):
        sep = str(sep)
    meta_keys = [sep.join(val) for val in meta]
    def _recursive_extract(data, path, seen_meta, level=0):
        if (len(path) > 1):
            for obj in data:
                for (val, key) in zip(meta, meta_keys):
                    if ((level + 1) == len(val)):
                        seen_meta[key] = _pull_field(obj, val[(-1)])
                _recursive_extract(obj[path[0]], path[1:], seen_meta, level=(level + 1))
        else:
            for obj in data:
                recs = _pull_field(obj, path[0])
                lengths.append(len(recs))
                for (val, key) in zip(meta, meta_keys):
                    if ((level + 1) > len(val)):
                        meta_val = seen_meta[key]
                    else:
                        try:
                            meta_val = _pull_field(obj, val[level:])
                        except KeyError as e:
                            if (errors == 'ignore'):
                                meta_val = np.nan
                            else:
                                raise...

What's a good function header?
 Here's a good function header?
assistant
#Here's a good function header.

def json_normalize(data, record_path=None, meta=None, meta_prefix=None, record_prefix=None, errors='raise', sep='.'):