<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def makeDict(self, onlyTheseTags = None, longNames = False, raw = False, numAuthors = True, genderCounts = True):
 """Returns a dict with each key a tag and the values being lists of the values for each of the Records in the collection, `None` is given when there is no value and they are in the same order across each tag. When used with pandas: `pandas.DataFrame(RC.makeDict())` returns a data frame with each column a tag and each row a Record. # Parameters _onlyTheseTags_ : `optional [iterable]` > Default `None`, if an iterable (list, tuple, etc) only the tags in _onlyTheseTags_ will be used, if not given then all tags in the records are given. > If you want to use all known tags pass [metaknowledge.knownTagsList](./ExtendedRecord.html#metaknowledge.ExtendedRecord.tagProcessingFunc). _longNames_ : `optional [bool]` > Default `False`, if `True` will convert the tags to their longer names, otherwise the short 2 character ones will be used. _cleanedVal_ : `optional [bool]` > Default `True`, if `True` the processed values for each `Record`'s field will be provided, otherwise the raw values are given. _numAuthors_ : `optional [bool]` > Default `True`, if `True` adds the number of authors as the column `'numAuthors'`. """

        if onlyTheseTags:
            for i in range(len(onlyTheseTags)):
                if onlyTheseTags[i] in fullToTagDict:
                    onlyTheseTags[i] = fullToTagDict[onlyTheseTags[i]]
            retrievedFields = onlyTheseTags
        else:
            retrievedFields = []
            for R in self:
                tagsLst = [t for t in R.keys() if t not in retrievedFields]
                retrievedFields += tagsLst
        if longNames:
            try:
                retrievedFields = [tagToFullDict[t] for t in retrievedFields]
            except KeyError:
                raise KeyError("One of the tags could not be converted to a long name.")
        retDict = {k : [] for k in retrievedFields}
        if numAuthors:
            retDict["num-Authors"] = []
        if genderCounts:
            retDict.update({'num-Male' : [], 'num-Female' : [], 'num-Unknown' : []})
        for R in self:
            if numAuthors:
                retDict["num-Authors"].append(len(R.get('authorsShort', [])))
            if genderCounts:
                m, f, u = R.authGenders(_countsTuple = True)
                retDict['num-Male'].append(m)
                retDict['num-Female'].append(f)
                retDict['num-Unknown'].append(u)
            for k, v in R.subDict(retrievedFields, raw = raw).items():
                retDict[k].append(v)
        return retDict