<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def location(self, filetype, base_dir=None, **kwargs):
 """Return the location of the relative sas path of a given type of file. Parameters filetype : str File type parameter. Returns ------- full : str The relative sas path to the file. """


        full = kwargs.get('full', None)
        if not full:
            full = self.full(filetype, **kwargs)

        self.set_base_dir(base_dir=base_dir)
        location = full[len(self.base_dir):] if full and full.startswith(self.base_dir) else None

        if location and '//' in location:
            location = location.replace('//', '/')

        return location