code: def replace(self, **kwargs):
          
          #  NOTE: Deprecation value is hard coded as True in __init__ and therefore does not need to be passed through.
          return Location(
              kwargs.pop('org', self.course_key.org),
              kwargs.pop('course', self.course_key.course),
              kwargs.pop('run', self.course_key.run),
              kwargs.pop('category', self.block_type),
              kwargs.pop('name', self.block_id),
              revision=kwargs.pop('revision', self.branch),
              **kwargs
          )
docs: Return: a new :class:`Location` with specific ``kwargs`` replacing
              their corresponding values.
  
          Using BlockUsageLocator's replace function results in a mismatch of __init__ args and kwargs.
              Replace tries to instantiate a Location object with BlockUsageLocator's args and kwargs.