<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def delete(args):
 """ cdstarcat delete OID Delete an object specified by OID from CDSTAR. """

    with _catalog(args) as cat:
        n = len(cat)
        cat.delete(args.args[0])
        args.log.info('{0} objects deleted'.format(n - len(cat)))
        return n - len(cat)