code: def _set_prior(self, prior):
          
  
          if prior is None:
  
              # Removing prior
  
              self._prior = None
  
          else:
  
              # Try and call the prior with the current value of the parameter
              try:
  
                  _ = prior(self.value)
  
              except:
  
                  raise NotCallableOrErrorInCall("Could not call the provided prior. " +
                                                 "Is it a function accepting the current value of the parameter?")
  
              try:
  
                  prior.set_units(self.unit, u.dimensionless_unscaled)
  
              except AttributeError:
  
                  raise NotCallableOrErrorInCall("It looks like the provided prior is not a astromodels function.")
  
              self._prior = prior
docs: Set prior for this parameter. The prior must be a function accepting the current value of the parameter
          as input and giving the probability density as output.