<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def as_objective(obj):
 """Convert obj into Objective class. Strings of the form "layer:n" become the Objective channel(layer, n). Objectives are returned unchanged. Args: obj: string or Objective. Returns: Objective """

  if isinstance(obj, Objective):
    return obj
  elif callable(obj):
    return obj
  elif isinstance(obj, str):
    layer, n = obj.split(":")
    layer, n = layer.strip(), int(n)
    return channel(layer, n)