'Set a restriction on which assets can be ordered.
Parameters
restricted_list : container[Asset], SecurityList
The assets that cannot be ordered.'

@api_method
def set_do_not_order_list(self, restricted_list, on_error='fail'):

    if isinstance(restricted_list, SecurityList):
        warnings.warn('`set_do_not_order_list(security_lists.leveraged_etf_list)`    is    deprecated.    Use    `set_asset_restrictions(security_lists.restrict_leveraged_etfs)`    instead.', category=ZiplineDeprecationWarning, stacklevel=2)
        restrictions = SecurityListRestrictions(restricted_list)
    else:
        warnings.warn('`set_do_not_order_list(container_of_assets)`    is    deprecated.    Create    a    zipline.finance.asset_restrictions.StaticRestrictions    object    with    a    container    of    assets    and    use    `set_asset_restrictions(StaticRestrictions(container_of_assets))`    instead.', category=ZiplineDeprecationWarning, stacklevel=2)
        restrictions = StaticRestrictions(restricted_list)
    self.set_asset_restrictions(restrictions, on_error)
