<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def map_gid(self, tiled_gid):
 """ Used to lookup a GID read from a TMX file's data :param tiled_gid: GID that is found in TMX data :rtype: (GID, flags) for the the GID passed, None if not found """

        try:
            return self.gidmap[int(tiled_gid)]
        except KeyError:
            return None
        except TypeError:
            msg = "GIDs must be an integer"
            logger.debug(msg)
            raise TypeError