code: def set_asset_restrictions(self, restrictions, on_error='fail'):
          
          control = RestrictedListOrder(on_error, restrictions)
          self.register_trading_control(control)
          self.restrictions |= restrictions
docs: Set a restriction on which assets can be ordered.
  
          Parameters
          ----------
          restricted_list : Restrictions
              An object providing information about restricted assets.
  
          See Also
          --------
          zipline.finance.asset_restrictions.Restrictions