def _splitattr(attr):
    """
    Splits the attr string into obj/attr tuple.

    NOTE: Only the first '.' will be split and returned
          ex. _splitattr(ball.foo.bar) returns ('ball','foo.bar')
    """
    tokens = attr.split('.')
    if len(tokens) > 1:
        return (tokens[0], '.'.join(tokens[1:]))
    return (tokens[0], "")